pkgsrc/emulators/simh/patches/patch-aa
marino 78b6052c65 emulators/simh: Prevent -lto switch on DragonFly
This package starting failing this week.  It was due to an change in the
system binutils which turned on link time optimization support.  This
was intended for external compilers.

The package picked up that the linker was capable of supporting -flto, but
then just assumed the compiler also was!  "4.4.7" was added to the list of
compilers to exclude.  Earlier versions are not necessary because the
-flto switch would be suppressed anyway due to binutils not supporting it.
2012-07-18 23:46:01 +00:00

26 lines
917 B
Text

$NetBSD: patch-aa,v 1.12 2012/07/18 23:46:02 marino Exp $
Exclude -flto for gcc 4.1.3 (used in NetBSD/vax 6)
Exclude -flto for gcc 4.4.7 (Used in DragonFly 2.13 - 3.1)
Make -O2 conditional so can be overridden by environment
--- makefile.orig 2012-06-13 16:46:32.000000000 +0000
+++ makefile
@@ -63,7 +63,7 @@ ifeq ($(WIN32),) #*nix Environments (&&
OSNAME = windows-build
endif
GCC_VERSION = $(shell $(GCC) -v /dev/null 2>&1 | grep 'gcc version' | awk '{ print $$3 }')
- LTO_EXCLUDE_VERSIONS =
+ LTO_EXCLUDE_VERSIONS = 4.1.3 4.4.7
PCAPLIB = pcap
ifeq (agcc,$(findstring agcc,$(GCC))) # Android target build?
OS_CCDEFS = -D_GNU_SOURCE
@@ -300,7 +300,7 @@ ifneq ($(DEBUG),)
CFLAGS_O = -O0
BUILD_FEATURES = - debugging support
else
- CFLAGS_O = -O2
+ CFLAGS_O ?= -O2
LDFLAGS_O =
GCC_MAJOR_VERSION = $(firstword $(subst ., ,$(GCC_VERSION)))
ifneq (3,$(GCC_MAJOR_VERSION))