From 2f4627bc37ae80de40a55d054f3ce7b1c98adc6b Mon Sep 17 00:00:00 2001 From: "James E. Housley" Date: Wed, 19 Nov 2003 23:31:30 +0000 Subject: [PATCH] Since once mk/bsd.cpu.mk adds the -mcpu and/or -march flags they can't be removed. And setting NO_CPU_CFLAGS in a ports Makefile does not help. It might be nice if Mk/bsd.port.mk would remove it if NO_CPU_CFLAGS was set, patch coming soon. --- devel/i386-rtems-binutils/Makefile | 1 - devel/i386-rtems-g77/Makefile | 9 +++++++-- devel/i386-rtems-gcc/Makefile | 8 ++++++-- devel/i386-rtems-gdb/Makefile | 1 - devel/i386-rtems-objc/Makefile | 9 +++++++-- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/devel/i386-rtems-binutils/Makefile b/devel/i386-rtems-binutils/Makefile index f96fc326f259..8f2219c31fc0 100644 --- a/devel/i386-rtems-binutils/Makefile +++ b/devel/i386-rtems-binutils/Makefile @@ -28,7 +28,6 @@ USE_BZIP2= yes USE_GMAKE= yes GNU_CONFIGURE= yes ALL_TARGET= all info -NO_CPUCFLAGS= yes USE_REINPLACE= yes CONFIGURE_TARGET?= --target=${LCLTARGET} diff --git a/devel/i386-rtems-g77/Makefile b/devel/i386-rtems-g77/Makefile index be6f443749ff..5b29ef4d31c1 100644 --- a/devel/i386-rtems-g77/Makefile +++ b/devel/i386-rtems-g77/Makefile @@ -44,7 +44,6 @@ PKGNAMEPREFIX= ${LCLTARGET}- USE_GMAKE= yes GNU_CONFIGURE= yes ALL_TARGET= all info -NO_CPUCFLAGS= yes CONFIGURE_TARGET?= --target=${LCLTARGET} CONFIGURE_ARGS?= --with-gnu-as --with-gnu-ld --with-newlib --verbose \ @@ -57,7 +56,13 @@ CONFIGURE_SCRIPT?= ../${G77NAME}/configure PATCH_WRKSRC= ${WRKDIR} PATCH_STRIP= -p -MAKE_FLAGS= LANGUAGES="f77" +NO_CPU_FLAGS= true +MAKE_FLAGS= LANGUAGES="c c++ java" +MAKE_ENV= MACHINE_ARCH=${RTEMS_ARCH} NO_CPU_CFLAGS=true +# Since once mk/bsd.cpu.mk adds the _CPUCFLAGS they can't be removed +# by NO_CPU_FLAGS, and since they are added long before here we are +# stuck with this hack. +CFLAGS:= ${CFLAGS:C/-mcpu=[^ ]*//:C/-march=[^ ]*//} pre-configure: @(cd ${WRKDIR} ; \ diff --git a/devel/i386-rtems-gcc/Makefile b/devel/i386-rtems-gcc/Makefile index 8ffb5f5cbbc7..dcf726c154ff 100644 --- a/devel/i386-rtems-gcc/Makefile +++ b/devel/i386-rtems-gcc/Makefile @@ -49,7 +49,6 @@ USE_GMAKE= yes GNU_CONFIGURE= yes USE_REINPLACE= yes ALL_TARGET= all info -NO_CPUCFLAGS= yes CONFIGURE_TARGET?= --target=${LCLTARGET} CONFIGURE_ARGS?= --with-gnu-as --with-gnu-ld --with-newlib --verbose \ @@ -62,8 +61,13 @@ CONFIGURE_SCRIPT?= ../${GCCNAME}/configure PATCH_WRKSRC= ${WRKDIR} PATCH_STRIP= -p +NO_CPU_FLAGS= true MAKE_FLAGS= LANGUAGES="c c++ java" -MAKE_ENV= MACHINE_ARCH=${RTEMS_ARCH} +MAKE_ENV= MACHINE_ARCH=${RTEMS_ARCH} NO_CPU_CFLAGS=true +# Since once mk/bsd.cpu.mk adds the _CPUCFLAGS they can't be removed +# by NO_CPU_FLAGS, and since they are added long before here we are +# stuck with this hack. +CFLAGS:= ${CFLAGS:C/-mcpu=[^ ]*//:C/-march=[^ ]*//} MAN1= ${LCLTARGET}-gcc.1 ${LCLTARGET}-g++.1 ${LCLTARGET}-gcj.1 \ cpp.1 gcov.1 gcjh.1 jv-scan.1 jcf-dump.1 gij.1 \ diff --git a/devel/i386-rtems-gdb/Makefile b/devel/i386-rtems-gdb/Makefile index c74372e16339..d1b221ee76f7 100644 --- a/devel/i386-rtems-gdb/Makefile +++ b/devel/i386-rtems-gdb/Makefile @@ -36,7 +36,6 @@ PKGNAMEPREFIX= ${LCLTARGET}- USE_GMAKE= yes GNU_CONFIGURE= yes ALL_TARGET= all info -NO_CPUCFLAGS= yes CONFIGURE_TARGET?= --target=${LCLTARGET} CONFIGURE_ARGS?= --verbose diff --git a/devel/i386-rtems-objc/Makefile b/devel/i386-rtems-objc/Makefile index 8e903541a532..80fde57873fc 100644 --- a/devel/i386-rtems-objc/Makefile +++ b/devel/i386-rtems-objc/Makefile @@ -44,7 +44,6 @@ PKGNAMEPREFIX= ${LCLTARGET}- USE_GMAKE= yes GNU_CONFIGURE= yes ALL_TARGET= all info -NO_CPUCFLAGS= yes CONFIGURE_TARGET?= --target=${LCLTARGET} CONFIGURE_ARGS?= --with-gnu-as --with-gnu-ld --with-newlib --verbose \ @@ -57,7 +56,13 @@ CONFIGURE_SCRIPT?= ../${OBJCNAME}/configure PATCH_WRKSRC= ${WRKDIR} PATCH_STRIP= -p -MAKE_FLAGS= LANGUAGES="objc" +NO_CPU_FLAGS= true +MAKE_FLAGS= LANGUAGES="c c++ java" +MAKE_ENV= MACHINE_ARCH=${RTEMS_ARCH} NO_CPU_CFLAGS=true +# Since once mk/bsd.cpu.mk adds the _CPUCFLAGS they can't be removed +# by NO_CPU_FLAGS, and since they are added long before here we are +# stuck with this hack. +CFLAGS:= ${CFLAGS:C/-mcpu=[^ ]*//:C/-march=[^ ]*//} pre-configure: @(cd ${WRKDIR} ; \