diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-03-13 15:39:43 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2013-03-13 15:39:43 +0000 |
commit | cd8b4432fcb0617fde0883a7408b679aa923abc8 (patch) | |
tree | 3e184aa3cd1d3a7bc53820765eeaf5d312209984 | |
parent | 6c076e87772ff70fa600f1e126c392a8e3a01b71 (diff) | |
download | eglibc2-cd8b4432fcb0617fde0883a7408b679aa923abc8.tar.gz |
Prevent build from using g++ from host machine
Stage 1 does not build a C++ compiler, but autoconf configure scripts
will happily use g++ from the host system instead. Force CXX=false to
make sure that it doesn't try to build any C++ code.
-rw-r--r-- | stage2-eglibc.morph | 4 | ||||
-rw-r--r-- | stage2-eglibc.morph.yaml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/stage2-eglibc.morph b/stage2-eglibc.morph index b2a3fde30..0d0d4bcfa 100644 --- a/stage2-eglibc.morph +++ b/stage2-eglibc.morph @@ -6,7 +6,7 @@ "cd libc && ln -s ../ports ports", "cd o && touch extra-configure-flags", "cd o && if echo \"$TARGET\" | grep arm; then \\\n echo \"--without-fp\" > extra-configure-flags; \\\nfi\n", - "CFLAGS=\"-O2 $CFLAGS\"; \\\ncd o && ../libc/configure $(cat extra-configure-flags) \\\n --prefix=\"$PREFIX\" --build=$BUILD --host=$TARGET_STAGE1 \\\n `# [1]` --libdir=\"$PREFIX/lib\" \\\n `# [2]` --with-headers=\"$(pwd)/../../$PREFIX/include\" \\\n `# [3]` --disable-profile --enable-kernel=2.6.25 \\\n --enable-add-ons=nptl,ports --without-cvs --without-selinux \\\n `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \\\n libc_cv_forced_unwind=yes libc_cv_ssp=no\n" + "export CFLAGS=\"-O2 $CFLAGS\"; export CXX=false; \\\ncd o && ../libc/configure $(cat extra-configure-flags) \\\n --prefix=\"$PREFIX\" --build=$BUILD --host=$TARGET_STAGE1 \\\n `# [1]` --libdir=\"$PREFIX/lib\" \\\n `# [2]` --with-headers=\"$(pwd)/../../$PREFIX/include\" \\\n `# [3]` --disable-profile --enable-kernel=2.6.25 \\\n --enable-add-ons=nptl,ports --without-cvs --without-selinux \\\n `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \\\n libc_cv_forced_unwind=yes libc_cv_ssp=no\n" ], "build-commands": [ "cd o && make localtime=UTC" @@ -15,6 +15,6 @@ "cd o && make install_root=\"$DESTDIR\" localtime=UTC install", "install -m 755 stage2-eglibc-fix-specs $DESTDIR$PREFIX/bin", "install -d $DESTDIR/lib", - "cpu=$(echo $TARGET | cut -d '-' -f 1)\nif [ \"$cpu\" == \"x86_64\" ]; then \n install -d \"$DESTDIR/lib64\"\n ln -s \"$PREFIX/lib/ld-linux-x86-64.so.2\" \\\n \"$DESTDIR/lib64/ld-linux-x86-64.so.2\"\nelse\n loader=$(basename $(ls \"$DESTDIR$PREFIX\"/lib/ld-linux*))\n ln -s \"$PREFIX/lib/$loader\" \"$DESTDIR/lib/$loader\"\nfi\n" + "cpu=$(echo $TARGET | cut -d '-' -f 1)\nif [ \"$cpu\" == \"x86_64\" ]; then\n install -d \"$DESTDIR/lib64\"\n ln -s \"$PREFIX/lib/ld-linux-x86-64.so.2\" \\\n \"$DESTDIR/lib64/ld-linux-x86-64.so.2\"\nelse\n loader=$(basename $(ls \"$DESTDIR$PREFIX\"/lib/ld-linux*))\n ln -s \"$PREFIX/lib/$loader\" \"$DESTDIR/lib/$loader\"\nfi\n" ] } diff --git a/stage2-eglibc.morph.yaml b/stage2-eglibc.morph.yaml index bc02a2ba9..d592ee1f1 100644 --- a/stage2-eglibc.morph.yaml +++ b/stage2-eglibc.morph.yaml @@ -20,7 +20,7 @@ configure-commands: # 4. Force configuration values of certain things that can't be detected # in a cross-compile. - | - CFLAGS="-O2 $CFLAGS"; \ + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ cd o && ../libc/configure $(cat extra-configure-flags) \ --prefix="$PREFIX" --build=$BUILD --host=$TARGET_STAGE1 \ `# [1]` --libdir="$PREFIX/lib" \ |