From 960592e8e57d1638ea3e03e38dc3c655523a2d07 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 19 Oct 2014 22:20:02 +0000 Subject: Patch m4 to be glibc-2.20 compatible m4 has a hacked up stdio.h which will give warnings when certain functions are used. One of these warnings was that 'gets' is a deprecated function. The patch removes the code that adds the warning. Presumably the new version of glibc finally got rid of it, which makes it puzzling that the deprecation warning code was failing to handle the fact that the deprecated function could have been removed. --- strata/core.morph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strata/core.morph b/strata/core.morph index 5c90c964..6c4baba2 100644 --- a/strata/core.morph +++ b/strata/core.morph @@ -31,7 +31,7 @@ chunks: - name: m4 morph: strata/core/m4.morph repo: upstream:m4 - ref: d533342af991401d865de9b037ac03cdc9bd852e + ref: cfbd353f3a2dc517992bcdc747281a22feb0c4db unpetrify-ref: baserock/build-essential build-depends: [] - name: mini-utils -- cgit v1.2.1 From e3aa40a40a2d067b394c167795478a9443ac1fc2 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 19 Oct 2014 22:20:33 +0000 Subject: Update bison to v3.0.2 --- strata/core.morph | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strata/core.morph b/strata/core.morph index 6c4baba2..96731777 100644 --- a/strata/core.morph +++ b/strata/core.morph @@ -226,8 +226,8 @@ chunks: - name: bison morph: strata/core/bison.morph repo: upstream:bison - ref: 6729ad1c314b179225325dcc1bc684077a71f859 - unpetrify-ref: baserock/morph + ref: 2ab6d1daaccf32fc4314e4b2fe44da977f11a308 + unpetrify-ref: baserock/v3.0.2 build-depends: - autoconf - automake -- cgit v1.2.1 From 86b4a9e71eabf8bcdbdd8302e9e5acf234c128a5 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 20 Oct 2014 16:23:36 +0000 Subject: Update patch to v2.7.1 --- strata/foundation.morph | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strata/foundation.morph b/strata/foundation.morph index 0b2bd92e..6d45fb1f 100644 --- a/strata/foundation.morph +++ b/strata/foundation.morph @@ -124,8 +124,8 @@ chunks: - name: patch morph: strata/foundation/patch.morph repo: upstream:patch - ref: 9a16dcb97aac1a26af4372d95bd62b84f3f1264a - unpetrify-ref: baserock/morph + ref: 3bbb26c928a147cfcf0756f1cc0a1307e5cc663f + unpetrify-ref: baserock/v2.7.1 build-depends: [] - name: tbdiff morph: strata/foundation/tbdiff.morph -- cgit v1.2.1 From da7298490695b4b1ca0d1d33fbfc7e22e812d5be Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 28 Oct 2014 11:32:24 +0000 Subject: Patch syslinux to work with glibc-2.20 This patch sets _DEFAULT_SOURCE when needed. This patch is included in newer versions of syslinux, but the transition is complicated. --- strata/bsp-x86_32-generic.morph | 2 +- strata/bsp-x86_64-generic.morph | 2 +- strata/bsp-x86_both-tools.morph | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/strata/bsp-x86_32-generic.morph b/strata/bsp-x86_32-generic.morph index 303dd777..fa9dbf75 100644 --- a/strata/bsp-x86_32-generic.morph +++ b/strata/bsp-x86_32-generic.morph @@ -20,7 +20,7 @@ chunks: - name: syslinux morph: strata/bsp-x86_32-generic/syslinux.morph repo: upstream:syslinux - ref: 8821237240c5374d83298b2da5ad88fa1e3c1ef7 + ref: 2f6d21d2a560cb5581694fef42ee9a350d5f302f unpetrify-ref: baserock/morph build-depends: - nasm diff --git a/strata/bsp-x86_64-generic.morph b/strata/bsp-x86_64-generic.morph index 81c99e42..8a7b9c9b 100644 --- a/strata/bsp-x86_64-generic.morph +++ b/strata/bsp-x86_64-generic.morph @@ -20,7 +20,7 @@ chunks: - name: syslinux morph: strata/bsp-x86_64-generic/syslinux.morph repo: upstream:syslinux - ref: 8821237240c5374d83298b2da5ad88fa1e3c1ef7 + ref: 2f6d21d2a560cb5581694fef42ee9a350d5f302f unpetrify-ref: baserock/morph build-depends: - nasm diff --git a/strata/bsp-x86_both-tools.morph b/strata/bsp-x86_both-tools.morph index 4d6d29e4..c1ba501c 100644 --- a/strata/bsp-x86_both-tools.morph +++ b/strata/bsp-x86_both-tools.morph @@ -14,7 +14,7 @@ chunks: - name: syslinux morph: strata/bsp-x86_both-tools/syslinux.morph repo: upstream:syslinux - ref: 8821237240c5374d83298b2da5ad88fa1e3c1ef7 + ref: 2f6d21d2a560cb5581694fef42ee9a350d5f302f unpetrify-ref: baserock/morph build-depends: - nasm -- cgit v1.2.1 From f31a410c1f2ee5f21a69be85c20b0af1fb5a1726 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 31 Oct 2014 00:45:42 +0000 Subject: Patch busybox to be glibc-2.20 compatible This patch is needed because glibc rearranged its headers to not leak as many definitions unintentionally, but busybox was relying on the leaked definitions. --- strata/build-essential.morph | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strata/build-essential.morph b/strata/build-essential.morph index 7886b610..a23aca93 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -113,7 +113,7 @@ chunks: - name: stage2-busybox morph: strata/build-essential/stage2-busybox.morph repo: upstream:busybox - ref: eeb9014f28e3aa00673a0fad127e7420da4392db + ref: 8a801e0f024f1385d8e989b80b90443546bceae7 unpetrify-ref: baserock/build-essential build-depends: - stage1-binutils @@ -251,7 +251,7 @@ chunks: - name: busybox morph: strata/build-essential/busybox.morph repo: upstream:busybox - ref: bf06394ab87ff22662084c82c1821847c25b7f21 + ref: 8a801e0f024f1385d8e989b80b90443546bceae7 unpetrify-ref: baserock/build-essential build-depends: - stage2-binutils -- cgit v1.2.1 From 3d4ee90374202dcd02cdd2770831ecfff77091b7 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 28 Oct 2014 16:26:11 +0000 Subject: Add stage2-fake-bash before eglibc This change is to prepare the transition to glibc since the latter is going to need bash to build. --- strata/build-essential.morph | 10 ++++++++++ strata/build-essential/stage2-fake-bash.morph | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 strata/build-essential/stage2-fake-bash.morph diff --git a/strata/build-essential.morph b/strata/build-essential.morph index a23aca93..35ceaed9 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -121,6 +121,15 @@ chunks: - stage2-eglibc build-mode: bootstrap prefix: /tools +- name: stage2-fake-bash + morph: strata/build-essential/stage2-fake-bash.morph + repo: upstream:bash + ref: 3590145af6f1c9fa321dff231f69ae696e7e740b + unpetrify-ref: baserock/bash-4.3-patch-27 + build-depends: + - stage2-busybox + build-mode: bootstrap + prefix: /tools - name: stage2-fhs-dirs morph: strata/build-essential/stage2-fhs-dirs.morph repo: baserock:baserock/fhs-dirs @@ -201,6 +210,7 @@ chunks: build-depends: - stage2-binutils - stage2-busybox + - stage2-fake-bash - stage2-eglibc - stage2-fhs-dirs - stage2-gawk diff --git a/strata/build-essential/stage2-fake-bash.morph b/strata/build-essential/stage2-fake-bash.morph new file mode 100644 index 00000000..021fd366 --- /dev/null +++ b/strata/build-essential/stage2-fake-bash.morph @@ -0,0 +1,4 @@ +name: stage2-fake-bash +kind: chunk +install-commands: +- printf '#!/bin/sh\nexec /bin/sh "$@"\n' | install -D /proc/self/fd/0 -m 755 "$DESTDIR$PREFIX/bin/bash" -- cgit v1.2.1 From 0cbbccbc9df630f9694c464f640ed0b29e62e6ed Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 31 Oct 2014 00:46:21 +0000 Subject: Use glibc instead of eglibc --- strata/build-essential.morph | 82 ++++++++++++++-------------- strata/build-essential/eglibc.morph | 62 --------------------- strata/build-essential/glibc.morph | 86 ++++++++++++++++++++++++++++++ strata/build-essential/stage2-eglibc.morph | 56 ------------------- strata/build-essential/stage2-glibc.morph | 57 ++++++++++++++++++++ 5 files changed, 184 insertions(+), 159 deletions(-) delete mode 100644 strata/build-essential/eglibc.morph create mode 100644 strata/build-essential/glibc.morph delete mode 100644 strata/build-essential/stage2-eglibc.morph create mode 100644 strata/build-essential/stage2-glibc.morph diff --git a/strata/build-essential.morph b/strata/build-essential.morph index 35ceaed9..6cc85e8c 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -36,7 +36,7 @@ products: include: - fhs-dirs-.* - busybox-.* - - eglibc-nss + - glibc-nss chunks: - name: stage1-binutils morph: strata/build-essential/stage1-binutils.morph @@ -65,11 +65,11 @@ chunks: - stage1-gcc build-mode: bootstrap prefix: /tools -- name: stage2-eglibc - morph: strata/build-essential/stage2-eglibc.morph - repo: upstream:eglibc2 - ref: 43ee5d250ad47d2bee8ec17954efb7f22d2b804c - unpetrify-ref: baserock/2.15-build-essential +- name: stage2-glibc + morph: strata/build-essential/stage2-glibc.morph + repo: upstream:glibc + ref: 52cf9a0153c14df4f6ae3bd0e1e6cc5d171e586c + unpetrify-ref: baserock/glibc-2.20 build-depends: - stage1-binutils - stage1-gcc @@ -84,7 +84,7 @@ chunks: build-depends: - stage1-binutils - stage1-gcc - - stage2-eglibc + - stage2-glibc build-mode: bootstrap prefix: /tools - name: stage2-gcc-fixed-headers @@ -95,7 +95,7 @@ chunks: build-depends: - stage1-binutils - stage1-gcc - - stage2-eglibc + - stage2-glibc build-mode: bootstrap prefix: /tools - name: stage2-gcc @@ -106,7 +106,7 @@ chunks: build-depends: - stage1-binutils - stage1-gcc - - stage2-eglibc + - stage2-glibc - stage2-gcc-fixed-headers build-mode: bootstrap prefix: /tools @@ -118,7 +118,7 @@ chunks: build-depends: - stage1-binutils - stage1-gcc - - stage2-eglibc + - stage2-glibc build-mode: bootstrap prefix: /tools - name: stage2-fake-bash @@ -146,7 +146,7 @@ chunks: build-depends: - stage1-binutils - stage1-gcc - - stage2-eglibc + - stage2-glibc build-mode: bootstrap prefix: /tools - name: stage2-make @@ -157,19 +157,19 @@ chunks: build-depends: - stage1-binutils - stage1-gcc - - stage2-eglibc + - stage2-glibc build-mode: bootstrap prefix: /tools - name: stage2-reset-specs morph: strata/build-essential/stage2-reset-specs.morph - repo: upstream:eglibc2 - ref: 43ee5d250ad47d2bee8ec17954efb7f22d2b804c - unpetrify-ref: baserock/2.15-build-essential + repo: upstream:glibc + ref: 52cf9a0153c14df4f6ae3bd0e1e6cc5d171e586c + unpetrify-ref: baserock/glibc-2.20 build-depends: - stage1-binutils - stage1-gcc - stage2-linux-api-headers - - stage2-eglibc + - stage2-glibc build-mode: bootstrap prefix: /tools - name: fhs-dirs @@ -180,7 +180,7 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc @@ -195,23 +195,23 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs -- name: eglibc - morph: strata/build-essential/eglibc.morph - repo: upstream:eglibc2 - ref: df0258044f321990eadd647e03095a48ad04c1a8 - unpetrify-ref: baserock/2.15-build-essential +- name: glibc + morph: strata/build-essential/glibc.morph + repo: upstream:glibc + ref: 52cf9a0153c14df4f6ae3bd0e1e6cc5d171e586c + unpetrify-ref: baserock/glibc-2.20 build-depends: - stage2-binutils - stage2-busybox - stage2-fake-bash - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc @@ -220,9 +220,9 @@ chunks: - stage2-reset-specs - linux-api-headers artifacts: - eglibc-gconv: build-essential-runtime - eglibc-libs: build-essential-minimal - eglibc-nss: build-essential-runtime + glibc-gconv: build-essential-runtime + glibc-libs: build-essential-minimal + glibc-nss: build-essential-runtime - name: zlib morph: strata/build-essential/zlib.morph repo: upstream:zlib @@ -231,14 +231,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc artifacts: zlib-libs: build-essential-minimal - name: binutils @@ -249,14 +249,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - zlib - name: busybox morph: strata/build-essential/busybox.morph @@ -266,14 +266,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - name: gawk morph: strata/build-essential/gawk.morph repo: upstream:gawk @@ -282,14 +282,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - name: gcc morph: strata/build-essential/gcc.morph repo: upstream:gcc-tarball @@ -298,14 +298,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - zlib artifacts: gcc-libs: build-essential-minimal @@ -317,14 +317,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - name: ccache morph: strata/build-essential/ccache.morph repo: upstream:ccache @@ -333,12 +333,12 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - zlib diff --git a/strata/build-essential/eglibc.morph b/strata/build-essential/eglibc.morph deleted file mode 100644 index cc827ef9..00000000 --- a/strata/build-essential/eglibc.morph +++ /dev/null @@ -1,62 +0,0 @@ -name: eglibc -kind: chunk -products: -- artifact: eglibc-nss - include: - - etc/nsswitch.conf - - (usr/)?lib/libnss.* -- artifact: eglibc-gconv - include: - - (usr/)?lib/gconv/.* -- artifact: eglibc-libs - include: - - sbin/ldconfig - - lib(32|64)?/ld-.* - - (usr/)?lib(exec)?/pt_chown -- artifact: eglibc-bins - include: - - (usr/)?s?bin/.* - - (usr/)?libexec/getconf/.* - - (usr/)?lib/libSegFault\.so(\.\d+)*$ -- artifact: eglibc-libs - include: - - (usr/)?lib(32|64)?/lib[^/]*\.so(\.\d+)*$ -- artifact: eglibc-devel - include: - - (usr/)?include/.* - - (usr/)?lib(32|64)?/lib.*\.a - - (usr/)?lib(32|64)?/lib.*\.la - - (usr/)?(lib(32|64)?|share)/pkgconfig/.*\.pc - - (usr/)?lib(32|64)?/.*\.o -- artifact: eglibc-locale - include: - - (usr/)?share/locale/.* - - (usr/)?share/i18n/.* - - (usr/)?share/zoneinfo/.* -- artifact: eglibc-misc - include: - - .* -configure-commands: -- mkdir o - -# Necessary for ARM port -- cd libc && ln -s ../ports ports - -- | - export CFLAGS="-O2 $CFLAGS"; cd o && - ../libc/configure \ - $(../morph-arch-config) \ - --prefix="$PREFIX" \ - --disable-profile \ - --enable-kernel=2.6.25 \ - --enable-add-ons=nptl,ports \ - --without-cvs \ - --without-selinux - -build-commands: -- cd o && make localtime=UTC - -install-commands: -- cd o && make install_root="$DESTDIR" localtime=UTC install -- mkdir -p "$DESTDIR/etc" -- install -m 644 -o root -g root nsswitch.conf "$DESTDIR/etc/nsswitch.conf" diff --git a/strata/build-essential/glibc.morph b/strata/build-essential/glibc.morph new file mode 100644 index 00000000..1de242af --- /dev/null +++ b/strata/build-essential/glibc.morph @@ -0,0 +1,86 @@ +name: glibc +kind: chunk +products: +- artifact: glibc-nss + include: + - etc/nsswitch.conf + - (usr/)?lib/libnss.* +- artifact: glibc-gconv + include: + - (usr/)?lib/gconv/.* +- artifact: glibc-libs + include: + - sbin/ldconfig + - lib(32|64)?/ld-.* + - (usr/)?lib(exec)?/pt_chown +- artifact: glibc-bins + include: + - (usr/)?s?bin/.* + - (usr/)?libexec/getconf/.* + - (usr/)?lib/libSegFault\.so(\.\d+)*$ +- artifact: glibc-libs + include: + - (usr/)?lib(32|64)?/lib[^/]*\.so(\.\d+)*$ +- artifact: glibc-devel + include: + - (usr/)?include/.* + - (usr/)?lib(32|64)?/lib.*\.a + - (usr/)?lib(32|64)?/lib.*\.la + - (usr/)?(lib(32|64)?|share)/pkgconfig/.*\.pc + - (usr/)?lib(32|64)?/.*\.o +- artifact: glibc-locale + include: + - (usr/)?share/locale/.* + - (usr/)?share/i18n/.* + - (usr/)?share/zoneinfo/.* +- artifact: glibc-misc + include: + - .* +configure-commands: +- mkdir o + +- | + case "$MORPH_ARCH" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + # We override the PATH here to remove /tools/bin from it. + # Thanks to this glibc finds bash in /bin/bash through the /bin + # symlink. This is important because glibc changes the path to bash + # of the shebang in some scripts and these scripts will be broken if + # they point to bash in /tools/bin/bash. + export PATH="/usr/bin:/sbin:/bin"; + export CFLAGS="-O2 $CFLAGS"; + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="$PREFIX" \ + --disable-profile \ + --enable-kernel=2.6.25 \ + --without-cvs \ + --without-selinux \ + --enable-obsolete-rpc + +build-commands: +- cd o && make localtime=UTC + +install-commands: +- cd o && make install_root="$DESTDIR" localtime=UTC install +- mkdir -p "$DESTDIR/etc" +- | + cat < nsswitch.conf + passwd: compat + group: compat + shadow: compat + + hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 myhostname + networks: files + + protocols: db files + services: db files + ethers: db files + rpc: db files + + netgroup: nis + EOF +- install -m 644 -o root -g root nsswitch.conf "$DESTDIR/etc/nsswitch.conf" diff --git a/strata/build-essential/stage2-eglibc.morph b/strata/build-essential/stage2-eglibc.morph deleted file mode 100644 index 3a7277ac..00000000 --- a/strata/build-essential/stage2-eglibc.morph +++ /dev/null @@ -1,56 +0,0 @@ -name: stage2-eglibc -kind: chunk - -configure-commands: -- mkdir o - -# Necessary for ARM port -- cd libc && ln -s ../ports ports - -# Configure flag notes: -# 1. Avoid installing to PREFIX/lib64 on x86_64. -# 2. Location of linux-api-headers. -# 3. Normal flags. See eglibc.morph. -# 4. Force configuration values of certain things that can't be detected -# in a cross-compile. -- | - export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ - cd o && ../libc/configure \ - $(../morph-arch-config) \ - --build=$(../libc/scripts/config.guess) --host=$TARGET_STAGE1 \ - --prefix="$PREFIX" \ - `# [1]` --libdir="$PREFIX/lib" \ - `# [2]` --with-headers="$(pwd)/../../$PREFIX/include" \ - `# [3]` --disable-profile --enable-kernel=2.6.25 \ - --enable-add-ons=nptl,ports --without-cvs --without-selinux \ - `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ - libc_cv_forced_unwind=yes libc_cv_ssp=no - -build-commands: -- cd o && make localtime=UTC - -install-commands: -- cd o && make install_root="$DESTDIR" localtime=UTC install -- sh stage2-eglibc-fix-specs - -# Install a symlink for the program interpreter (ld.so) so that binaries -# built in stage 3 before the stage 3 eglibc is built can use it. -# FIXME: get a better way of finding the name of the loader. The lib64 -# path is hardcoded into eglibc in the file -# sysdeps/unix/sysv/linux/configure. -- install -d $DESTDIR/lib -- | - cpu=$(echo $TARGET | cut -d '-' -f 1) - case "$cpu" in - x86_64) - install -d "$DESTDIR/lib64" - ln -s "$PREFIX/lib/ld-linux-x86-64.so.2" \ - "$DESTDIR/lib64/ld-linux-x86-64.so.2" ;; - ppc64) - install -d "$DESTDIR/lib64" - ln -s "$PREFIX/lib/ld64.so.1" \ - "$DESTDIR/lib64/ld64.so.1" ;; - *) - loader=$(basename $(ls "$DESTDIR$PREFIX"/lib/ld-linux*)) - ln -s "$PREFIX/lib/$loader" "$DESTDIR/lib/$loader" - esac diff --git a/strata/build-essential/stage2-glibc.morph b/strata/build-essential/stage2-glibc.morph new file mode 100644 index 00000000..ffa0970b --- /dev/null +++ b/strata/build-essential/stage2-glibc.morph @@ -0,0 +1,57 @@ +name: stage2-glibc +kind: chunk + +configure-commands: +- mkdir o + +# Configure flag notes: +# 1. Avoid installing to PREFIX/lib64 on x86_64. +# 2. Location of linux-api-headers. +# 3. Normal flags. See glibc.morph. +# 4. Force configuration values of certain things that can't be detected +# in a cross-compile. +- | + case "$MORPH_ARCH" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ + cd o && ../configure \ + $ARCH_FLAGS \ + --build=$(../scripts/config.guess) --host=$TARGET_STAGE1 \ + --prefix="$PREFIX" \ + `# [1]` --libdir="$PREFIX/lib" \ + `# [2]` --with-headers="$(pwd)/../../$PREFIX/include" \ + `# [3]` --disable-profile --enable-kernel=2.6.25 \ + `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \ + libc_cv_forced_unwind=yes libc_cv_ssp=no + +build-commands: +- cd o && make localtime=UTC + +install-commands: +- cd o && make install_root="$DESTDIR" localtime=UTC install +- sh stage2-glibc-fix-specs + +# Install a symlink for the program interpreter (ld.so) so that binaries +# built in stage 3 before the stage 3 glibc is built can use it. +# FIXME: get a better way of finding the name of the loader. The lib64 +# path is hardcoded into glibc in the file +# sysdeps/unix/sysv/linux/configure. +- install -d $DESTDIR/lib +- | + cpu=$(echo $TARGET | cut -d '-' -f 1) + case "$cpu" in + x86_64) + install -d "$DESTDIR/lib64" + ln -s "$PREFIX/lib/ld-linux-x86-64.so.2" \ + "$DESTDIR/lib64/ld-linux-x86-64.so.2" ;; + ppc64) + install -d "$DESTDIR/lib64" + ln -s "$PREFIX/lib/ld64.so.1" \ + "$DESTDIR/lib64/ld64.so.1" ;; + *) + loader=$(basename $(ls "$DESTDIR$PREFIX"/lib/ld-linux*)) + ln -s "$PREFIX/lib/$loader" "$DESTDIR/lib/$loader" + esac -- cgit v1.2.1 From 2ae730e358568c4fe5febd4873db2edb90453cd2 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 11 Nov 2014 18:27:09 +0000 Subject: Reorder hosts in nsswitch.conf --- strata/build-essential/glibc.morph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strata/build-essential/glibc.morph b/strata/build-essential/glibc.morph index 1de242af..789283eb 100644 --- a/strata/build-essential/glibc.morph +++ b/strata/build-essential/glibc.morph @@ -73,7 +73,7 @@ install-commands: group: compat shadow: compat - hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 myhostname + hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4 networks: files protocols: db files -- cgit v1.2.1 From a1b414f80343d1029e3691226ed146fd7f405cb0 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 9 Nov 2014 00:58:10 +0000 Subject: Various patches in gcc 4.7 (stage3) These patches are needed to: - Build gcc in armv7b. - Support the name change of the dynamic linker in the new version of glibc. - Remove the old morphology files. --- strata/build-essential.morph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strata/build-essential.morph b/strata/build-essential.morph index 6cc85e8c..de375b04 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -293,7 +293,7 @@ chunks: - name: gcc morph: strata/build-essential/gcc.morph repo: upstream:gcc-tarball - ref: b0254026149b13782eae26d38435a4c62a002cf0 + ref: 5c08cea34d5562dc828b85c7c02519246823aaf0 unpetrify-ref: baserock/build-essential-4.7 build-depends: - stage2-binutils -- cgit v1.2.1 From 755636110227894d1eab44c1b6401a3ec0b696f2 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 9 Nov 2014 01:20:41 +0000 Subject: Various patches in gcc 4.6 (stage1 and stage2) These patches are needed to: - Support the name change of the dynamic linker in the new version of glibc. - Build gcc in x86_32. - Remove old morphology files. --- strata/build-essential.morph | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strata/build-essential.morph b/strata/build-essential.morph index de375b04..38bd60d8 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -49,7 +49,7 @@ chunks: - name: stage1-gcc morph: strata/build-essential/stage1-gcc.morph repo: upstream:gcc-tarball - ref: 0a1a077d3466cd99a4ed5590db2146b3fec6fff1 + ref: 999c918a7ad32ad436395666def22ab90b3447fe unpetrify-ref: baserock/build-essential build-depends: - stage1-binutils @@ -90,7 +90,7 @@ chunks: - name: stage2-gcc-fixed-headers morph: strata/build-essential/stage2-gcc-fixed-headers.morph repo: upstream:gcc-tarball - ref: 0a1a077d3466cd99a4ed5590db2146b3fec6fff1 + ref: 999c918a7ad32ad436395666def22ab90b3447fe unpetrify-ref: baserock/build-essential build-depends: - stage1-binutils @@ -101,7 +101,7 @@ chunks: - name: stage2-gcc morph: strata/build-essential/stage2-gcc.morph repo: upstream:gcc-tarball - ref: 0a1a077d3466cd99a4ed5590db2146b3fec6fff1 + ref: 999c918a7ad32ad436395666def22ab90b3447fe unpetrify-ref: baserock/build-essential build-depends: - stage1-binutils -- cgit v1.2.1