mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

76 lines
2.3 KiB

#!/bin/bash
if [ "$ROCKCFG_X86_BITS" = 32 ]
then
case "$ROCKCFG_X86_OPT" in
generic)
var_append GCC_WRAPPER_INSERT " " "-march=i486"
;;
via-c3)
var_append GCC2_WRAPPER_INSERT " " "-march=k6"
var_append GCC3_WRAPPER_INSERT " " "-march=k62"
var_append GCC4_WRAPPER_INSERT " " "-march=k62"
;;
via-c3-improved)
var_append GCC_WRAPPER_INSERT " " "-march=i686"
;;
via-c3-2)
var_append GCC2_WRAPPER_INSERT " " "-march=pentiumpro"
var_append GCC3_WRAPPER_INSERT " " "-march=pentium-mmx"
var_append GCC4_WRAPPER_INSERT " " "-march=pentium-mmx"
;;
k6*)
var_append GCC2_WRAPPER_INSERT " " "-march=k6"
var_append GCC3_WRAPPER_INSERT " " "-march=$ROCKCFG_X86_OPT"
# workaround and should be removed when gcc 3.x got fixed ...
var_append GCC3_WRAPPER_INSERT " " "-fno-branch-count-reg"
var_append GCC4_WRAPPER_INSERT " " "-march=$ROCKCFG_X86_OPT"
# # workaround and should be removed when gcc 3.x got fixed ...
# var_append GCC4_WRAPPER_INSERT " " "-fno-branch-count-reg"
;;
*)
var_append GCC3_WRAPPER_INSERT " " "-march=$ROCKCFG_X86_OPT"
var_append GCC4_WRAPPER_INSERT " " "-march=$ROCKCFG_X86_OPT"
;;
esac
case "$ROCKCFG_X86_OPT" in
i486)
var_append GCC2_WRAPPER_INSERT " " "-march=$ROCKCFG_X86_OPT" ;;
pentium|pentium-mmx)
var_append GCC2_WRAPPER_INSERT " " "-march=pentium" ;;
pentium*)
var_append GCC2_WRAPPER_INSERT " " "-march=pentiumpro" ;;
athlon*)
var_append GCC2_WRAPPER_INSERT " " "-march=k6" ;;
esac
else
case "$ROCKCFG_X86_OPT" in
generic)
# Other values like i686 or pentiumpro cause a build error in e.g.
# glibc 2.6.1 when building with gcc 4.2.1.
if [[ "$xpkg" = *-32bit ]] ; then
var_append GCC_WRAPPER_INSERT " " "-march=pentium4"
fi
;;
intel)
var_append GCC2_WRAPPER_INSERT " " "-march=x86_64"
var_append GCC3_WRAPPER_INSERT " " "-march=nocona"
var_append GCC4_WRAPPER_INSERT " " "-march=nocona"
;;
athlon)
var_append GCC2_WRAPPER_INSERT " " "-march=x86_64"
var_append GCC3_WRAPPER_INSERT " " "-march=k8"
var_append GCC4_WRAPPER_INSERT " " "-march=k8"
;;
esac
fi
# remove other -march and -mtune options from the argument list
var_insert GCC_WRAPPER_REMOVE " " "-march=* -mtune=*"
# Remove deprecated options:
var_insert GCC_WRAPPER_REMOVE " " "-mcpu=* -m386 -m486 -mpentium -mpentiumpro"