Base GCC doesn't support -Wno-incompatible-pointer-types, which breaks

building on GCC-based architectures.  Add -Wno-incompatible-pointer-types
only when using Clang.

PR:		235512
Submitted by:	Piotr Kubaj
Approved by:	maintainer
This commit is contained in:
Mark Linimon 2019-02-06 00:08:08 +00:00
parent 02cebb1fb2
commit a7ab4eec68
2 changed files with 6 additions and 9 deletions

View file

@ -14,16 +14,10 @@ COMMENT= Two mathematics libraries for Rexx
LICENSE= MPL10
BROKEN_mips= fails to compile: unrecognized command line option "-Wno-incompatible-pointer-types"
BROKEN_mips64= fails to compile: unrecognized command line option "-Wno-incompatible-pointer-types"
BROKEN_powerpc64= fails to compile: unrecognized command line option "-Wno-incompatible-pointer-types"
BUILD_DEPENDS= ${LOCALBASE}/include/rexxsaa.h:lang/rexx-regina
USES= zip
CFLAGS+= -Wno-incompatible-pointer-types
WRKSRC= ${WRKDIR}/math
USE_LDCONFIG= yes
LLD_UNSAFE= yes
@ -38,6 +32,10 @@ PORTEXAMPLES= README testrxmath testrexxmath
OPTIONS_DEFINE= DOCS EXAMPLES
.if !exists(/usr/lib/libstdc++.so)
CFLAGS+= -Wno-incompatible-pointer-types
.endif
do-install:
${INSTALL_LIB} ${WRKSRC}/librexxmath.so ${STAGEDIR}${PREFIX}/lib/
${INSTALL_LIB} ${WRKSRC}/librxmath.so ${STAGEDIR}${PREFIX}/lib/

View file

@ -1,12 +1,11 @@
--- Makefile.bsd.orig 2001-11-04 18:09:04 UTC
--- Makefile.bsd.orig 2001-11-04 17:09:04 UTC
+++ Makefile.bsd
@@ -9,7 +9,8 @@
@@ -9,7 +9,7 @@
POPT=-O -fomit-frame-pointer
PLFL=-s
DEBUG=-g
-CFLAGS=$(OPT) $(DEBUG) -pipe -fpic -I $$HOME/regina -pipe
+CFLAGS+=$(OPT) $(DEBUG) -pipe -fpic -I $$HOME/regina -pipe -I/usr/local/include
+CFLAGS+=-Wno-incompatible-pointer-types
LDFLAGS=-Bdynamic -Bshareable $(LFL)
LIBS=-lm
so=so