Clean up architecture handling in configure.ac
Remove the need for two variables for the architecture-specific switches (things like "-march=i686") by combining it into one variable. Also allow configure to proceed with only a warning if we don't have presets for the detected architecture- it is kind of stupid to restrict ourselves like we had been. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
f81e619974
commit
3acbf56bba
31
configure.ac
31
configure.ac
|
@ -181,45 +181,41 @@ case "${host}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check for architecture
|
# Check for architecture, used in default makepkg.conf
|
||||||
|
# (Note single space left after CARCHFLAGS)
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
i686-*)
|
i686-*)
|
||||||
CARCH="i686"
|
CARCH="i686"
|
||||||
CARCHFLAGS="i686"
|
CARCHFLAGS="-march=i686 "
|
||||||
ARCHSWITCH="march"
|
|
||||||
;;
|
;;
|
||||||
x86_64-*)
|
x86_64-*)
|
||||||
CARCH="x86_64"
|
CARCH="x86_64"
|
||||||
CARCHFLAGS="x86-64"
|
CARCHFLAGS="-march=x86-64 "
|
||||||
ARCHSWITCH="march"
|
|
||||||
;;
|
;;
|
||||||
ia64-*)
|
ia64-*)
|
||||||
CARCH="ia64"
|
CARCH="ia64"
|
||||||
CARCHFLAGS="ia64"
|
CARCHFLAGS="-march=ia64 "
|
||||||
ARCHSWITCH="march"
|
|
||||||
;;
|
;;
|
||||||
sparc-*)
|
sparc-*)
|
||||||
CARCH="sparc"
|
CARCH="sparc"
|
||||||
CARCHFLAGS="v9"
|
CARCHFLAGS="-mcpu=v9 "
|
||||||
ARCHSWITCH="mcpu"
|
|
||||||
;;
|
;;
|
||||||
ppc-* | powerpc-*)
|
ppc-* | powerpc-*)
|
||||||
CARCH="ppc"
|
CARCH="ppc"
|
||||||
CARCHFLAGS="750"
|
CARCHFLAGS="-mcpu=750 "
|
||||||
ARCHSWITCH="mcpu"
|
|
||||||
;;
|
;;
|
||||||
i386-*)
|
i386-*)
|
||||||
CARCH="i386"
|
CARCH="i386"
|
||||||
CARCHFLAGS="i386"
|
CARCHFLAGS="-march=i386 "
|
||||||
ARCHSWITCH="march"
|
|
||||||
;;
|
;;
|
||||||
arm-*)
|
arm-*)
|
||||||
CARCH="arm"
|
CARCH="arm"
|
||||||
CARCHFLAGS="armv4"
|
CARCHFLAGS="-march=armv4 "
|
||||||
ARCHSWITCH="march"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([[Your architecture is not supported; consider adding it to configure.ac]])
|
AC_MSG_WARN([[Your architecture is unknown for makepkg.conf, consider adding it to configure.ac]])
|
||||||
|
CARCH="unknown"
|
||||||
|
CARCHFLAGS=""
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -227,7 +223,6 @@ esac
|
||||||
CHOST="${host}"
|
CHOST="${host}"
|
||||||
AC_SUBST(CARCH)
|
AC_SUBST(CARCH)
|
||||||
AC_SUBST(CARCHFLAGS)
|
AC_SUBST(CARCHFLAGS)
|
||||||
AC_SUBST(ARCHSWITCH)
|
|
||||||
AC_SUBST(CHOST)
|
AC_SUBST(CHOST)
|
||||||
|
|
||||||
# Check for doxygen support
|
# Check for doxygen support
|
||||||
|
@ -315,7 +310,7 @@ $PACKAGE_STRING:
|
||||||
defines : ${DEFS}
|
defines : ${DEFS}
|
||||||
|
|
||||||
Architecture : ${CARCH}
|
Architecture : ${CARCH}
|
||||||
Architecture flags : -${ARCHSWITCH}=${CARCHFLAGS}
|
Architecture flags : ${CARCHFLAGS}
|
||||||
Host Type : ${CHOST}
|
Host Type : ${CHOST}
|
||||||
|
|
||||||
libalpm version : ${LIB_VERSION}
|
libalpm version : ${LIB_VERSION}
|
||||||
|
|
|
@ -29,8 +29,8 @@ CHOST="@CHOST@"
|
||||||
#-- Exclusive: will only run on @CARCHFLAGS@
|
#-- Exclusive: will only run on @CARCHFLAGS@
|
||||||
# -march (or -mcpu) builds exclusively for an architecture
|
# -march (or -mcpu) builds exclusively for an architecture
|
||||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
# -mtune optimizes for an architecture, but builds for whole processor family
|
||||||
CFLAGS="-@ARCHSWITCH@=@CARCHFLAGS@ -mtune=generic -O2 -pipe"
|
CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
||||||
CXXFLAGS="-@ARCHSWITCH@=@CARCHFLAGS@ -mtune=generic -O2 -pipe"
|
CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue