From 68ccc98930468839bf6b5fd2266a9a13953d13df Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 4 Aug 2013 17:20:56 +0200 Subject: [PATCH] Build the cross gcc for the secondary arch as such Pass --enable-hybrid-secondary to gcc's configure when building it as a secondary compiler. Doesn't make a difference for building Haiku itself, but makes it easier to match the Haiku cross devel package with the compiler when building bootstrap packages with haikuporter. gcc 4 only ATM. --- build/scripts/build_cross_tools_gcc4 | 4 ++++ configure | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/build/scripts/build_cross_tools_gcc4 b/build/scripts/build_cross_tools_gcc4 index 74eae6878e..1bdada3691 100755 --- a/build/scripts/build_cross_tools_gcc4 +++ b/build/scripts/build_cross_tools_gcc4 @@ -135,6 +135,10 @@ if [ "$HAIKU_USE_GCC_GRAPHITE" = 1 ]; then --with-host-libstdcxx=\"-lstdc++\"" fi +if [ -n "$SECONDARY_ARCH" ]; then + gccConfigureArgs="$gccConfigureArgs --enable-hybrid-secondary" +fi + # force the POSIX locale, as the build (makeinfo) might choke otherwise export LC_ALL=POSIX diff --git a/configure b/configure index a416149c87..6cfdbae557 100755 --- a/configure +++ b/configure @@ -649,6 +649,7 @@ else set_default_value HAIKU_STRIP_$targetArch strip fi + isPrimaryArch=1 for targetArch in $targetArchs; do # Note: targetArch is "unknown" at this point, if a cross-tools # prefix was specified. The standard_gcc_settings call below will get @@ -664,6 +665,11 @@ else if [ $targetArch != x86_gcc2 ]; then script="${script}_gcc4 $targetMachine" fi + secondaryArch= + if [ -z "$isPrimaryArch" ]; then + secondaryArch=$targetArch + fi + SECONDARY_ARCH=$secondaryArch \ HAIKU_USE_GCC_GRAPHITE=`get_variable \ HAIKU_USE_GCC_GRAPHITE_$targetArch` \ $script "$sourceDir" "$buildCrossTools" "$crossToolsDir" \ @@ -726,6 +732,7 @@ else esac HAIKU_PACKAGING_ARCHS="$HAIKU_PACKAGING_ARCHS $targetArch" + isPrimaryArch= done fi