summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-08-14 00:12:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-08-14 00:12:23 +0000
commit07fa38957de104303b5d82b672ec8b1442fffba8 (patch)
treed3729adc1a0c0e7f0ae76414285fed2d4d075eb4 /gnu/usr.bin
parent6230a02147b92e9f7ccc878a8af3016910aea345 (diff)
gcc 3.3.2 needs -fno-delete-null-pointer-checks in addition to
-fno-strict-aliasing. Avoid the need for compiling some bits with -O1 on arm (and others). Problem debugged and OK miod@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/perl/Configure16
-rw-r--r--gnu/usr.bin/perl/Makefile.bsd-wrapper62
2 files changed, 22 insertions, 56 deletions
diff --git a/gnu/usr.bin/perl/Configure b/gnu/usr.bin/perl/Configure
index 0e7b46366f5..c5284b90f98 100644
--- a/gnu/usr.bin/perl/Configure
+++ b/gnu/usr.bin/perl/Configure
@@ -18,7 +18,7 @@
# you may fetch it yourself from your nearest archive site.)
#
-# $Id: Configure,v 1.13 2004/04/07 21:32:58 millert Exp $
+# $Id: Configure,v 1.14 2004/08/09 18:08:53 millert Exp $
#
# Generated on Wed May 12 13:00:30 METDST 2004 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
@@ -4730,6 +4730,20 @@ default|recommended)
else
echo "Nope, it doesn't, but that's ok." 2>&1
fi
+ echo " "
+ echo "Checking if your compiler accepts -fno-delete-null-pointer-checks" 2>&1
+ echo 'int main(void) { return 0; }' > gcctest.c
+ if $cc -O2 -fno-delete-null-pointer-checks -o gcctest gcctest.c; then
+ echo "Yes, it does." 2>&1
+ case "$ccflags" in
+ *delete-null-pointer-checks*)
+ echo "Leaving current flags $ccflags alone." 2>&1
+ ;;
+ *) dflt="$dflt -fno-delete-null-pointer-checks" ;;
+ esac
+ else
+ echo "Nope, it doesn't, but that's ok." 2>&1
+ fi
;;
esac
# For gcc, adding -pipe speeds up compilations for some, but apparently
diff --git a/gnu/usr.bin/perl/Makefile.bsd-wrapper b/gnu/usr.bin/perl/Makefile.bsd-wrapper
index 0e5e1bf02cd..20ab4b4c34e 100644
--- a/gnu/usr.bin/perl/Makefile.bsd-wrapper
+++ b/gnu/usr.bin/perl/Makefile.bsd-wrapper
@@ -1,13 +1,19 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.67 2004/08/11 11:13:10 pefo Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.68 2004/08/14 00:12:22 millert Exp $
#
# Build wrapper for Perl 5.8.5
#
+# For ``NOMAN'' and ``USE_GCC3''
+.include <bsd.own.mk>
+
# To build a threaded perl, uncomment this. Not stable on all platforms...
#THREADED_PERL=true
# Perl builds with -fno-strict-aliasing, we want libperl to do the same
CFLAGS+= -fno-strict-aliasing
+.if ${USE_GCC3:L} == "yes"
+CFLAGS+= -fno-delete-null-pointer-checks
+.endif
# Arguments passed to Configure...
CONFIGURE_ARGS= -dsE -Dopenbsd_distribution=defined
@@ -16,9 +22,6 @@ CONFIGURE_ARGS+= -Dusethreads
CFLAGS+= -pthread
.endif
-# For ``NOMAN''
-.include <bsd.own.mk>
-
# Our lndir is hacked; specify a full path to avoid potential conflicts
# with the one installed with X11.
LNDIR= /usr/bin/lndir
@@ -616,57 +619,6 @@ x2p/cflags:
perly.c perly.h: perly.y
-@true
-# Work around a gcc bug on arm
-.if ${MACHINE_ARCH} == "arm"
-pp_hot.o: pp_hot.c
- @echo "${COMPILE.c} ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_hot.go: pp_hot.c
- @echo "${COMPILE.c} -g ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} -g ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_hot.po: pp_hot.c
- @echo "${COMPILE.c} -p ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} -p ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_hot.so: pp_hot.c
- @echo "${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_ctl.o: pp_ctl.c
- @echo "${COMPILE.c} ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_ctl.go: pp_ctl.c
- @echo "${COMPILE.c} -g ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} -g ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_ctl.po: pp_ctl.c
- @echo "${COMPILE.c} -p ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} -p ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-
-pp_ctl.so: pp_ctl.c
- @echo "${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -O1 -o ${.TARGET}"
- @${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -O1 -o ${.TARGET}.o
- @${LD} -x -r ${.TARGET}.o -o ${.TARGET}
- @rm -f ${.TARGET}.o
-.endif
-
.ifdef NOMAN
maninstall:
@echo NOMAN is set