From f15f607454aac3aea121fadda58e52ef16ea21e1 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Mon, 11 Feb 2008 14:46:32 +0200 Subject: [PATCH] Improved multilib parse-config first to cleanup and then injecting architecture specific compiler flags Note: Currently only x86-64 is implemented but others will be added as soon as they are tested properly! --- lib/multilib/parse-config | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/multilib/parse-config b/lib/multilib/parse-config index af6104e..388fa70 100644 --- a/lib/multilib/parse-config +++ b/lib/multilib/parse-config @@ -1,11 +1,11 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# +# # Filename: lib/multilib/parse-config # Copyright (C) 2008 The OpenSDE Project -# +# # More information can be found in the files COPYING and README. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the @@ -21,6 +21,19 @@ multilib_abi_loop() { abi=$( echo "$arch_abis" | cut -d ' ' "-f$1" ) echo_status "Building multilib $pkg for $abi ABI" + + # cleanup architecture specific compiler flags + var_remove_regex CC_WRAPPER_INSERT ' ' '\-m.*' + var_remove_regex CXX_WRAPPER_INSERT ' ' '\-m.*' + + # inject architecture specific compiler flags + case "$arch" in + x86-64) + var_insert CC_WRAPPER_INSERT ' ' "-m$abi" + var_insert CXX_WRAPPER_INSERT ' ' "-m$abi" + ;; + esac + # alter arch_target if we build 32bit if expr $abi : "32" > /dev/null ; then arch_target="`echo $arch_target | arch2arch32`"