summaryrefslogtreecommitdiff
path: root/00_blog/00018_Building/00040_Various-notes-on-Building
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2019-03-17 18:14:32 +0100
committerMiguel <m.i@gmx.at>2019-03-17 18:14:32 +0100
commit0e4810dcfb132bf276a282e25b8523a4009ae08b (patch)
treedac6dce820f0a35d9ed7ea7676982a0f86fd0edb /00_blog/00018_Building/00040_Various-notes-on-Building
parentad6411e9ec256b03f20b9195e25cb128fe02c628 (diff)
rename blog dir
Diffstat (limited to '00_blog/00018_Building/00040_Various-notes-on-Building')
-rw-r--r--00_blog/00018_Building/00040_Various-notes-on-Building/index.md93
1 files changed, 93 insertions, 0 deletions
diff --git a/00_blog/00018_Building/00040_Various-notes-on-Building/index.md b/00_blog/00018_Building/00040_Various-notes-on-Building/index.md
new file mode 100644
index 0000000..0639063
--- /dev/null
+++ b/00_blog/00018_Building/00040_Various-notes-on-Building/index.md
@@ -0,0 +1,93 @@
+# Various Notes on Building
+
+## Webkit
+
+Let’s compile a release with debug info and install to /usr/local
+
+~~~~~~ {.bash}
+wget https://webkitgtk.org/releases/webkitgtk-2.20.0.tar.xz
+tar -xvf webkitgtk-2.20.0.tar.xz
+cd webkitgtk-2.20.0
+# install all the libs that will be reported missing in the next step.
+# I could not find the woff2 stuff in debian so skipped it...
+cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_WOFF2=NO -GNinja
+# this takes about 30minutes on my i7-4790K .. zzzzz..zzz
+ninja
+sudo ninja install
+~~~~~~~~~~~
+
+ pkg-config
+
+ pkg-config uses our new build now:
+
+ [1] https://trac.webkit.org/wiki/BuildingGtk
+ [2] https://webkitgtk.org/
+
+## GCC
+
+This is how I build gcc (5.2.0) and binutils (2.25.1). Check [5] first.
+
+* unpack binutils-x.y.z
+* create a new directory binutils-x.y.z-build and inside it run the following commands:
+
+~~~~~~ {.bash}
+ $ ../binutils-x.y.z/configure --disable-nls --with-sysroot --enable-targets=all
+ $ make -j4
+ $ make install
+~~~~~~~~~~~~
+
+* unpack gcc-x.y.z and run the contrib/download_prerequisites script inside.
+* create a new directory: gcc-x.y.z-build and inside it run:
+
+~~~~~~ {.bash}
+ $ ../gcc-x.y.z/configure --disable-nls --enable-languages=c,c++ --enable-threads
+ $ make -j4
+ $ make install
+~~~~~~~~~~~~
+
+ REF:
+
+ [1] binutils and gcc README files.
+ [2] https://gcc.gnu.org/install/
+ [3] http://wiki.osdev.org/Building_GCC
+ [4] http://stackoverflow.com/questions/1726042/recipe-for-compiling-binutils-gcc-together
+ [5] https://gcc.gnu.org/install/prerequisites.html
+
+## Linux
+
+ cd linux-source-[xxx]
+ make mrproper
+ cp someconfig .config -i
+ make oldconfig
+ make menuconfig
+ make localmodconfig
+ make localyesconfig
+ make
+ (OPT) make modules
+ su
+ make install
+ (OPT) make modules_install
+ (OPT) update-intiramfs -c -k [kernel-postfix]
+
+ (REMOVE UNWANTED FILES FROM BOOT!)
+ update-grub
+ grub-install /dev/sda
+ reboot
+
+
+## Clang
+
+ http://llvm.org/releases/3.7.0/docs/CMake.html
+ http://clang.llvm.org/get_started.html
+ put MAKEFLAGS="-j8" or similar in front of your CMake invocations.
+
+ extracted llvm to ~/temp/clang/llvm-3.7.0.src/
+ extracted clang to ~/temp/clang/llvm-3.7.0.src/tools/clang/
+ extracted compiler-rt to ~/temp/clang/llvm-3.7.0.src/projects/compiler-rt
+ extracted libcxx to ~/temp/clang/llvm-3.7.0.src/projects/libcxx
+
+ $ cd ~/temp/clang/llvm-3.7.0-build
+ $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/miguel/opt/llvm-3.7.0 ../llvm-3.7.0.src
+ $ cmake --build .
+ $ cmake --build . --target install
+