From 8b2010cf665032804e9b293e983912bd90d84a5f Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Fri, 5 Mar 2010 16:19:19 +0100 Subject: [PATCH] gcc: fix to provide same settings we use for -m{arch,cpu,tune} via configure options gcc 4.4 introduced configure options for arch, cpu and tune which influence the default compiler settings on the final target machine. Because we inject -m{arch,cpu,tune} through the gcc wrapper we now have to provide the same settings through configure options, so the final user is not running into problems like getting missing symbols for software emulated facilities provided by the gcc support library. --- base/gcc/gcc.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/base/gcc/gcc.conf b/base/gcc/gcc.conf index da4509295..02acf186e 100644 --- a/base/gcc/gcc.conf +++ b/base/gcc/gcc.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../gcc/gcc.conf -# Copyright (C) 2006 - 2009 The OpenSDE Project +# Copyright (C) 2006 - 2010 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. @@ -13,6 +13,18 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- +# provide same settings we use for -m{arch,cpu,tune} via configure options +# so they are default compiler settings on the final target machine +if [ "${ver:0:3}" = "4.4" ]; then + for x in $GCC_WRAPPER_INSERT $GCC_WRAPPER_APPEND; do + case "$x" in + -march=*) var_append confopt " " "${x/-m/--with-}" ;; + -mcpu=*) var_append confopt " " "${x/-m/--with-}" ;; + -mtune=*) var_append confopt " " "${x/-m/--with-}" ;; + esac + done +fi + # create and set up cmd_wrapper for xgcc function setup_xgcc_wrapper() { mkdir gcc ; pushd gcc