[pacman-dev] [PATCH 1/2] build: remove mucking with CARCHFLAGS
We've never received an update to this, and gcc has sane defaults out of the box anyway, as do most projects in their build systems. Remove the magic here and just let downstream distros handle any changes or additions necessary, as we already do for LDFLAGS. Signed-off-by: Dan McGee <dan@archlinux.org> --- configure.ac | 11 ----------- etc/Makefile.am | 1 - etc/makepkg.conf.in | 8 +++----- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 6ad5be5..9f5b1cb 100644 --- a/configure.ac +++ b/configure.ac @@ -243,47 +243,37 @@ AC_SUBST(STRIP_SHARED) AC_SUBST(STRIP_STATIC) # Check for architecture, used in default makepkg.conf -# (Note single space left after CARCHFLAGS) case "${host}" in i686-*) CARCH="i686" - CARCHFLAGS="-march=i686 " ;; x86_64-*) CARCH="x86_64" - CARCHFLAGS="-march=x86-64 " ;; ia64-*) CARCH="ia64" - CARCHFLAGS="-march=ia64 " ;; sparc-*) CARCH="sparc" - CARCHFLAGS="-mcpu=v9 " ;; ppc-* | powerpc-*) CARCH="ppc" - CARCHFLAGS="-mcpu=750 " ;; i386-*) CARCH="i386" - CARCHFLAGS="-march=i386 " ;; arm-*) CARCH="arm" - CARCHFLAGS="-march=armv4 " ;; *) AC_MSG_WARN([[Your architecture is unknown for makepkg.conf, consider adding it to configure.ac]]) CARCH="unknown" - CARCHFLAGS="" ;; esac # Now do some things common to all architectures CHOST="${host}" AC_SUBST(CARCH) -AC_SUBST(CARCHFLAGS) AC_SUBST(CHOST) # Check for documentation support and status @@ -407,7 +397,6 @@ ${PACKAGE_NAME}: linker flags : ${LDFLAGS} Architecture : ${CARCH} - Architecture flags : ${CARCHFLAGS} Host Type : ${CHOST} Filesize command : ${SIZECMD} In-place sed command : ${SEDINPLACE} diff --git a/etc/Makefile.am b/etc/Makefile.am index 25f1834..67c0e98 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -19,7 +19,6 @@ edit = sed \ -e 's|@CARCH[@]|$(CARCH)|g' \ -e 's|@CHOST[@]|$(CHOST)|g' \ -e 's|@ARCHSWITCH[@]|$(ARCHSWITCH)|g' \ - -e 's|@CARCHFLAGS[@]|$(CARCHFLAGS)|g' \ -e 's|@ROOTDIR[@]|$(ROOTDIR)|g' $(dist_sysconf_DATA): Makefile diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index 778c530..65d8ab9 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -26,11 +26,9 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o % CARCH="@CARCH@" CHOST="@CHOST@" -#-- Exclusive: will only run on @CARCH@ -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" -CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe" +#-- Compiler and Linker Flags +#CFLAGS="-O2 -pipe" +#CXXFLAGS="-O2 -pipe" #LDFLAGS="" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" -- 1.7.6
Rather than a hardcoded list of only a few select architectures (of the 250+ case statements in config.guess), simply define CARCH to be the first component of the "target triplet". This introduces one "regression"- powerpc will no longer become ppc. However, this is easily worked around in downstream distros if wanted. This was the only CPU architecture with this oddity so it was felt worth the price to make this change. Note that 'ppc64' wasn't handled in this same odd fashion before anyway. Signed-off-by: Dan McGee <dan@archlinux.org> --- configure.ac | 32 ++------------------------------ 1 files changed, 2 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index 9f5b1cb..309a591 100644 --- a/configure.ac +++ b/configure.ac @@ -242,36 +242,8 @@ AC_SUBST(STRIP_BINARIES) AC_SUBST(STRIP_SHARED) AC_SUBST(STRIP_STATIC) -# Check for architecture, used in default makepkg.conf -case "${host}" in - i686-*) - CARCH="i686" - ;; - x86_64-*) - CARCH="x86_64" - ;; - ia64-*) - CARCH="ia64" - ;; - sparc-*) - CARCH="sparc" - ;; - ppc-* | powerpc-*) - CARCH="ppc" - ;; - i386-*) - CARCH="i386" - ;; - arm-*) - CARCH="arm" - ;; - *) - AC_MSG_WARN([[Your architecture is unknown for makepkg.conf, consider adding it to configure.ac]]) - CARCH="unknown" - ;; -esac - -# Now do some things common to all architectures +# Variables plugged into makepkg.conf +CARCH="${host%%-*}" CHOST="${host}" AC_SUBST(CARCH) AC_SUBST(CHOST) -- 1.7.6
participants (1)
-
Dan McGee