From aecdf469c14fceaacb6cf6b8309912fe019e272d Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Mon, 12 Sep 2011 19:04:55 +0200 Subject: [PATCH] glibc: fixed build of 32 Bit library on x86-64 when multilib is enabled Note: We need to inject proper -march while building 32 Bit ABI --- base/glibc/glibc.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base/glibc/glibc.conf b/base/glibc/glibc.conf index 5b388b452..39d8fd160 100644 --- a/base/glibc/glibc.conf +++ b/base/glibc/glibc.conf @@ -69,6 +69,16 @@ pkg_glibc_abi_preconf() { slibdir="lib$1" echo_status "slibdir: $slibdir" + # architecture specific compiler flags for 32bit ABIs + if [ "$1" = "32" ]; then + case "$arch" in + x86-64) + var_append CC_WRAPPER_INSERT ' ' "-march=$( cut -d- -f1 <<< $arch_target )" + var_append CXX_WRAPPER_INSERT ' ' "-march=$( cut -d- -f1 <<< $arch_target )" + ;; + esac + fi + # applies to all additional ABIs while building multilib if [ $buildloop -ge 2 ]; then # only install libraries and no programs