Sun Aug 1 12:35:06 2021 UTC ()
gcc.mk: Remove bogus test for NetBSD.


(nia)
diff -r1.224 -r1.225 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.224 -r1.225 pkgsrc/mk/compiler/gcc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/gcc.mk 2021/04/06 12:07:57 1.224
+++ pkgsrc/mk/compiler/gcc.mk 2021/08/01 12:35:06 1.225
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.224 2021/04/06 12:07:57 nia Exp $ 1# $NetBSD: gcc.mk,v 1.225 2021/08/01 12:35:06 nia Exp $
2# 2#
3# This is the compiler definition for the GNU Compiler Collection. 3# This is the compiler definition for the GNU Compiler Collection.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# GCCBASE 7# GCCBASE
8# If using a native GCC and the compiler is not in $PATH then 8# If using a native GCC and the compiler is not in $PATH then
9# this should be set to the base installation directory. 9# this should be set to the base installation directory.
10# 10#
11# USE_NATIVE_GCC 11# USE_NATIVE_GCC
12# When set to "yes", the native gcc is used, no matter which 12# When set to "yes", the native gcc is used, no matter which
13# compiler version a package requires. 13# compiler version a package requires.
14# 14#
@@ -373,35 +373,33 @@ LANGUAGES.gcc= c c++ fortran fortran77 o @@ -373,35 +373,33 @@ LANGUAGES.gcc= c c++ fortran fortran77 o
373_LANGUAGES.gcc= # empty 373_LANGUAGES.gcc= # empty
374.for _lang_ in ${USE_LANGUAGES} 374.for _lang_ in ${USE_LANGUAGES}
375_LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} 375_LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}}
376.endfor 376.endfor
377 377
378_WRAP_EXTRA_ARGS.cc+= -fcommon 378_WRAP_EXTRA_ARGS.cc+= -fcommon
379CWRAPPERS_PREPEND.cc+= -fcommon 379CWRAPPERS_PREPEND.cc+= -fcommon
380 380
381.if !empty(USE_LANGUAGES:Mc99) 381.if !empty(USE_LANGUAGES:Mc99)
382_WRAP_EXTRA_ARGS.CC+= -std=gnu99 382_WRAP_EXTRA_ARGS.CC+= -std=gnu99
383CWRAPPERS_APPEND.cc+= -std=gnu99 383CWRAPPERS_APPEND.cc+= -std=gnu99
384.endif 384.endif
385 385
386.if ${OPSYS} == "NetBSD" 386.if ${_PKGSRC_MKPIE} == "yes"
387_MKPIE_CFLAGS.gcc= -fPIC 387_MKPIE_CFLAGS.gcc= -fPIC
388# XXX for executables it should be: 388# XXX for executables it should be:
389#_MKPIE_CFLAGS.gcc= -fPIE 389#_MKPIE_CFLAGS.gcc= -fPIE
390# XXX for libraries a sink wrapper around gcc is required and used instead 390# XXX for libraries a sink wrapper around gcc is required and used instead
391_MKPIE_LDFLAGS.gcc= -pie 391_MKPIE_LDFLAGS.gcc= -pie
392.endif 
393 392
394.if ${_PKGSRC_MKPIE} == "yes" 
395_GCC_CFLAGS+= ${_MKPIE_CFLAGS.gcc} 393_GCC_CFLAGS+= ${_MKPIE_CFLAGS.gcc}
396#_GCC_LDFLAGS+= ${_MKPIE_LDFLAGS.gcc} 394#_GCC_LDFLAGS+= ${_MKPIE_LDFLAGS.gcc}
397CWRAPPERS_APPEND.cc+= ${_MKPIE_CFLAGS.gcc} 395CWRAPPERS_APPEND.cc+= ${_MKPIE_CFLAGS.gcc}
398CWRAPPERS_APPEND.cxx+= ${_MKPIE_CFLAGS.gcc} 396CWRAPPERS_APPEND.cxx+= ${_MKPIE_CFLAGS.gcc}
399# this differs for libraries and executables (handled in mk/cwrappers.mk) 397# this differs for libraries and executables (handled in mk/cwrappers.mk)
400# CWRAPPERS_APPEND.ld+= ${_MKPIE_LDFLAGS.gcc} 398# CWRAPPERS_APPEND.ld+= ${_MKPIE_LDFLAGS.gcc}
401.endif 399.endif
402 400
403.if ${_PKGSRC_MKREPRO} == "yes" 401.if ${_PKGSRC_MKREPRO} == "yes"
404.export WRKDIR 402.export WRKDIR
405# XXX the dollar sign should not be expanded by the shell 403# XXX the dollar sign should not be expanded by the shell
406_GCC_CFLAGS+= -fdebug-prefix-map=$$$$WRKDIR/= 404_GCC_CFLAGS+= -fdebug-prefix-map=$$$$WRKDIR/=
407.endif 405.endif