vapier 15/03/16 21:53:19 Added: busybox-1.23.1-trylink-flags.patch Log: Respect CFLAGS/CPPFLAGS when testing the compiler #471118#1 by Alphat-PC. (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Revision Changes Path 1.1 sys-apps/busybox/files/busybox-1.23.1-trylink-flags.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/files/busybox-1.23.1-trylink-flags.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/busybox/files/busybox-1.23.1-trylink-flags.patch?rev=1.1&content-type=text/plain Index: busybox-1.23.1-trylink-flags.patch =================================================================== >From 6798564b9e2f1a81b8c2d0cb4add97cb736d982b Mon Sep 17 00:00:00 2001 From: Mike Frysinger <[email protected]> Date: Mon, 16 Mar 2015 17:47:01 -0400 Subject: [PATCH] trylink: respect compiler settings when probing features The CPPFLAGS/CFLAGS settings might have features that matter, so make sure we utilize them when testing the compiler. URL: https://bugs.gentoo.org/471118 Signed-off-by: Mike Frysinger <[email protected]> --- scripts/trylink | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/trylink b/scripts/trylink index 5a67fcf..48c487b 100755 --- a/scripts/trylink +++ b/scripts/trylink @@ -49,7 +49,7 @@ check_cc() { local tempname="$(mktemp)" # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :( # "-xc": C language. "/dev/null" is an empty source file. - if $CC $1 -shared -xc /dev/null -o "$tempname".o >/dev/null 2>&1; then + if $CC $CPPFLAGS $CFLAGS $1 -shared -xc /dev/null -o "$tempname".o >/dev/null 2>&1; then echo "$1"; else echo "$2"; @@ -66,7 +66,7 @@ check_libc_is_glibc() { syntax error here #endif " >"$tempname".c - if $CC "$tempname".c -c -o "$tempname".o >/dev/null 2>&1; then + if $CC $CPPFLAGS $CFLAGS "$tempname".c -c -o "$tempname".o >/dev/null 2>&1; then echo "$2"; else echo "$1"; -- 2.3.2
