.
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=40
This commit is contained in:
parent
ff7dd2e10b
commit
f991935ec6
26
bash.spec
26
bash.spec
@ -347,13 +347,29 @@ cd ../readline-%{rl_vers}
|
|||||||
cflags ()
|
cflags ()
|
||||||
{
|
{
|
||||||
local flag=$1; shift
|
local flag=$1; shift
|
||||||
case "${RPM_OPT_FLAGS}" in
|
local var=$1; shift
|
||||||
|
test -n "${flag}" -a -n "${var}" || return
|
||||||
|
case "${!var}" in
|
||||||
*${flag}*) return
|
*${flag}*) return
|
||||||
esac
|
esac
|
||||||
if test -n "$1" && gcc -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
case "$flag" in
|
||||||
local var=$1; shift
|
-Wl,*)
|
||||||
eval $var=\${$var:+\$$var\ }$flag
|
set -o noclobber
|
||||||
fi
|
echo 'int main () { return 0; }' > ldtest.c
|
||||||
|
if ${CC:-gcc} -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
|
||||||
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
|
fi
|
||||||
|
set +o noclobber
|
||||||
|
rm -f ldtest.c
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||||
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
|
fi
|
||||||
|
if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
|
||||||
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
|
fi
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 -
|
echo 'int main () { return !(sizeof(void*) >= 8); }' | gcc -x c -o test64 -
|
||||||
if ./test64 ; then
|
if ./test64 ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user