From bc4695b6e47a1a207c6153d2f7cd84f5610413ac Mon Sep 17 00:00:00 2001 From: naddy Date: Fri, 14 Sep 2018 13:37:52 +0000 Subject: [PATCH] Pass CC/CFLAGS/LDFLAGS to the configure script. ok millert@ --- gnu/lib/libiberty/Makefile.bsd-wrapper | 6 ++++-- gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper | 8 +++++--- gnu/usr.bin/binutils/Makefile.bsd-wrapper | 8 +++++--- gnu/usr.bin/cvs/Makefile.bsd-wrapper | 10 ++++++---- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/gnu/lib/libiberty/Makefile.bsd-wrapper b/gnu/lib/libiberty/Makefile.bsd-wrapper index bf354b4e1e8..3c9eb8c6a31 100644 --- a/gnu/lib/libiberty/Makefile.bsd-wrapper +++ b/gnu/lib/libiberty/Makefile.bsd-wrapper @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.18 2017/07/10 21:30:37 espie Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.19 2018/09/14 13:37:52 naddy Exp $ LIB= iberty CPPFLAGS+= -DHAVE_CONFIG_H -I$(.CURDIR)/src -I$(.CURDIR)/include -I$(.OBJDIR) +XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS}" HOST_FILES!= cat $(.OBJDIR)/needed-list 2>/dev/null||true @@ -32,12 +33,13 @@ CLEANFILES+= Makefile config.cache config.log stamp-h xhost-mkfrag \ BUILDFIRST = needed-list needed-list: config.status - ${MAKE} ${GNUCFLAGS} CC="${CC}" needed-list + ${MAKE} ${XCFLAGS} needed-list config.status: Makefile.in configure PATH="/bin:/usr/bin:/sbin:/usr/sbin" \ INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \ MAKEINFO='makeinfo --no-split' \ + ${XCFLAGS} \ /bin/sh ${.CURDIR}/src/configure \ --prefix=/usr --with-local-prefix=/usr ${CF} \ && touch config.status diff --git a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper index 81634c49866..ed069d78d29 100644 --- a/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper +++ b/gnu/usr.bin/binutils-2.17/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.15 2018/07/26 13:20:53 kettenis Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.16 2018/09/14 13:37:52 naddy Exp $ .include @@ -8,6 +8,7 @@ SUBDIRS= opcodes bfd CONF_SUBDIRS= opcodes bfd CFLAGS+= ${PIE_DEFAULT} +XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDSTATIC}" # This allows moving the whole binutils installation around for # testing purposes PREFIX=/usr @@ -64,8 +65,7 @@ CONFIGTARGET+=--without-gnu-as all: config.status SUBDIRS='${SUBDIRS}' \ CONFIGURE_HOST_MODULES='${CONFIGURE_HOST_MODULES}' \ - ${MAKE} CC="${CC}" \ - CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS=${LDSTATIC} \ + ${MAKE} ${XCFLAGS} \ scriptdir=${PREFIX}/libdata \ tooldir=${PREFIX} \ MAKEINFO='makeinfo --no-split' \ @@ -86,6 +86,7 @@ CF= do-config: .USE PATH="/bin:/usr/bin:/sbin:/usr/sbin" \ MAKEINFO='makeinfo --no-split' \ + ${XCFLAGS} \ sh ${.CURDIR}/configure --prefix=${PREFIX} \ --infodir='$${prefix}/share/info' \ --disable-nls --disable-gdbtk --disable-install-libbfd ${CF} \ @@ -94,6 +95,7 @@ do-config: .USE sed -e 's,SUBDIRS *=,SUBDIRS ?=,' Makefile.tmp && \ mv -f Makefile.tmp Makefile cd ${.OBJDIR} && \ + ${XCFLAGS} \ ${MAKE} ${CONFIGURE_MODULES} gas/doc/as.1: config.status diff --git a/gnu/usr.bin/binutils/Makefile.bsd-wrapper b/gnu/usr.bin/binutils/Makefile.bsd-wrapper index 1c182be8266..d29a4b815b1 100644 --- a/gnu/usr.bin/binutils/Makefile.bsd-wrapper +++ b/gnu/usr.bin/binutils/Makefile.bsd-wrapper @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.86 2017/06/12 18:49:34 espie Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.87 2018/09/14 13:37:52 naddy Exp $ .include CFLAGS+= ${PIE_DEFAULT} +XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDSTATIC}" # This allows moving the whole binutils installation around for # testing purposes PREFIX=/usr @@ -34,8 +35,7 @@ CONFIGTARGET= all: config.status SUBDIRS='${SUBDIRS}' \ CONFIGURE_HOST_MODULES='${CONFIGURE_HOST_MODULES}' \ - ${MAKE} CC="${CC}" \ - CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS=${LDSTATIC} \ + ${MAKE} ${XCFLAGS} \ scriptdir=${PREFIX}/libdata \ tooldir=${PREFIX} \ MAKEINFO='makeinfo --no-split' \ @@ -56,6 +56,7 @@ CF= do-config: .USE PATH="/bin:/usr/bin:/sbin:/usr/sbin" \ MAKEINFO='makeinfo --no-split' \ + ${XCFLAGS} \ sh ${.CURDIR}/configure --prefix=${PREFIX} \ --infodir='$${prefix}/share/info' \ --disable-nls --disable-gdbtk --disable-install-libbfd ${CF} \ @@ -64,6 +65,7 @@ do-config: .USE sed -e 's,SUBDIRS *=,SUBDIRS ?=,' Makefile.tmp && \ mv -f Makefile.tmp Makefile cd ${.OBJDIR} && \ + ${XCFLAGS} \ ${MAKE} ${CONFIGURE_MODULES} config: do-config diff --git a/gnu/usr.bin/cvs/Makefile.bsd-wrapper b/gnu/usr.bin/cvs/Makefile.bsd-wrapper index 7f7a2b05943..b8add810d15 100644 --- a/gnu/usr.bin/cvs/Makefile.bsd-wrapper +++ b/gnu/usr.bin/cvs/Makefile.bsd-wrapper @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.57 2018/07/11 16:38:03 naddy Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.58 2018/09/14 13:37:52 naddy Exp $ .include MAN= man/cvs.1 man/cvs.5 man/cvsbug.8 man/rcs2log.1 -GNUCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" CPP="${CPP}" +XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" CPP="${CPP}" CLEANFILES= src/version.c lib/getdate.c lib/getdate.h macintosh/Makefile \ os2/Makefile zlib/Makefile \ windows-NT/SCC/Makefile emx/Makefile doc/CVSvn.texi \ @@ -15,7 +15,7 @@ CLEANFILES= src/version.c lib/getdate.c lib/getdate.h macintosh/Makefile \ LDFLAGS=${LDSTATIC} all: config.status - ${MAKE} ${GNUCFLAGS} LDFLAGS="${LDFLAGS}" all info + ${MAKE} ${XCFLAGS} LDFLAGS="${LDFLAGS}" all info .FORCE: .IGNORE @@ -33,6 +33,7 @@ config: .FORCE INSTALL_DATA="${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}" \ ACLOCAL=true AUTOCONF=true AUTOMAKE=true AUTOHEADER=true \ MAKEINFO='makeinfo --no-split' \ + ${XCFLAGS} \ ac_cv_path_ROFF='' \ sh ${.CURDIR}/configure --prefix=/usr --mandir=/usr/share/man \ --datadir=/usr/libdata ${CF} @@ -44,6 +45,7 @@ config.status: INSTALL_DATA="${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}" \ ACLOCAL=true AUTOCONF=true AUTOMAKE=true AUTOHEADER=true \ MAKEINFO='makeinfo --no-split' \ + ${XCFLAGS} \ ac_cv_path_ROFF='' \ sh ${.CURDIR}/configure --prefix=/usr --mandir=/usr/share/man \ --datadir=/usr/libdata ${CF} @@ -55,7 +57,7 @@ maninstall: BEFOREMAN=config.status install: maninstall - ${MAKE} ${GNUCFLAGS} prefix=${DESTDIR}/usr \ + ${MAKE} ${XCFLAGS} prefix=${DESTDIR}/usr \ infodir=/usr/share/info \ libexecdir=/usr/libexec \ bindir=/usr/bin INSTALL_MAN= install -- 2.20.1