# /site/domain/js.berklix.net/etc/make.conf.cflags # /site/domain/no.berklix.net/etc/make.conf.cflags -> \ # ../../js.berklix.net/etc/make.conf.cflags # /site/domain/xx.berklix.net/etc/make.conf.cflags -> \ # ../../no.berklix.net/etc/make.conf.cflags # Installed by /site/etc/Makefile to # http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/jhs/etc/ # See also ./make.conf # CFLAGS += -DBERKLIX=YES # Used by http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/ports/gen/Mk/bsd.port.mk.error_to_warn.REL=11.0-CURRENT.diff # CFLAGS += -DBERKLIX_TRACE=________________________________make.conf.cflags # 2019-01-02 patched out after seeing on current: # /usr/ports/www/chromium -> # /usr/ports/dns/c-ares # configure: CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -DBERKLIX=YES # CPPFLAGS += -DBERKLIX=YES # WARNING although various flags are discussed here, do Not set them in this # file, else you may destroy the generic nature of the CDROM build engines. # To see what Make macros are called in: # make -V .MAKEFILE_LIST|tr ' ' '\n'|grep -v '\.\.' # CFLAGS += -g # For gdb debugger # CFLAGS += -static # For gdb debugger # Do not leave -static on, else some ports eg devel/libzvbi # will build without creating shared libraries. # host=laps uname=8.2-RELEASE src/usr.sbin/ppp fails to build with this. # host=lapr 9.0-RELEASE src/sbin/atm/atmconfig fails to build with this # CFLAGS += -O # CFLAGS += -O0 # Do not optimize. # If you use multiple -O options, with or without level # numbers, the last such option is the one that is effective. # Message from "David O'Brien" # of "Thu, 02 Jun 2005 01:26:15 PDT." # <20050602082615.GA36096@dragon.NUXI.org> # > > +.if ${MACHINE_ARCH} == "amd64" # > > +CFLAGS+= -minline-all-stringops # > > +.endif # > > + # > Unfortunately we really don't like to put this type of CFLAGS # > in non-*.mk # > files. Since we know the GCC 3.4.2 compiler bugs will be fixed, I # > suggest we just document this issue and be happy that otherwise # > the code # > is ready to go on FreeBSD/amd64. # From: Jung-uk Kim # Date: Thu, 9 Jun 2005 # Don't panic; it is not critical at all. Other critical issues are # fixed in GCC 3.4.4, which is in -CURRENT. On -STABLE, you can use # ports/lang/gcc34 from ports. # From: Oliver Fromme # Date: Wed, 13 Sep 2006 11:05:44 +0200 (CEST) # To: freebsd-stable@freebsd.org # Marc G. Fournier wrote: # > What are ppl currently using for CFLAGS/COPTFLAGS in /etc/make.conf for # > building kernel/world? I know awhile back it wasn't recommended to go # > above -O2, for instance, but suspect that has changed ... ? # # The best optimization is probably to not override the # defaults at all, because they're already pretty optimal. # In fact, by overriding the defaults there's a good chance # to make things worse. :-) # # The default CFLAGS are "-O2 -pipe -fno-strict-aliasing". # Anything above -O2 isn't supported, and using -O2 without # -fno-strict-aliasing also isn't supported (and will create # broken code for some programs). A common mistake is to # specify CFLAGS="-O2 -pipe" and omit -fno-strict-aliasing. # That'll shot you in the foot sooner or later. #---------- # Mark Andrews ? # Lots of code is not strict-aliasing safe. Gcc itself can't # determine all the cases which a construct is not strict-aliasing # safe so even after getting rid of all the warnings gcc # produces you can't be sure your code is strict-aliasing # safe. Think of -fstrict-aliasing as optimisation without # a saftey net. If your code doesn't cast pointers you should # be safe otherwise you need to be really, really, really # careful when you turn this on. # Only on appropriate hosts, ie note amd64 # CFLAGS += -m486 # CFLAGS += -march=i686 # CFLAGS += -march=pentiumpro # Not if cross compiling. # CFLAGS += -march=pentium # Cross compiling to lapd,lapa,lapl # CFLAGS += -pipe # Uses more swap, so make world breaks on host=park. # The kernel compiles with -O -pipe, without the above. # COPTFLAGS= -pipe -DCOPTFLAGStracethatwillbreakkernel=yes # Warning if you set "COPTFLAGS=-pipe" then kernel will try to compile # without -O and fail to compile here: # cc -c -pipe -Wall -Wredundant-decls -Wnested-externs \ # -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline \ # -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. \ # -I../../../include -I../../contrib/ipfilter -I/usr/include \ # -D_KERNEL -include opt_global.h -elf -mpreferred-stack-boundary=2 \ # -fomit-frame-pointer ../../i386/i386/atomic.c # In file included from ../../i386/i386/atomic.c:47: # machine/atomic.h: In function `atomic_set_char': # machine/atomic.h:106: inconsistent operand constraints in an `asm' # From: "David O'Brien" # Date: Mon, 7 Mar 2005 22:09:10 -0800 (Tue 07:09 CET) # To: freebsd-amd64 @ freebsd.org # > Is -O2 optimization supported in amd64? It most definitely doesn't work: # It is suppored w/in /usr/src. # -O2 isn't supported in /usr/ports without -fno-strict-aliasing also. # There are a few ports that aren't happy being compiled with any form of # -O2 (such as the old perl). # CFLAGS += -minline-all-stringops # Sender: owner-freebsd-amd64 @ freebsd.org # On Wed, Jun 01, 2005 at 06:33:12PM -0400, Jung-uk Kim wrote: # > The kernel module doesn't load because of an amd64-specific GCC 3.4 # > optimization bug. To work around: # > RCS file: /home/ncvs/src/sys/modules/reiserfs/Makefile,v # > diff -u -r1.1 Makefile # > --- Makefile 24 May 2005 12:30:13 -0000 1.1 # > +++ Makefile 1 Jun 2005 22:22:52 -0000 # > @@ -8,4 +8,8 @@ # > reiserfs_namei.c reiserfs_prints.c reiserfs_stree.c \ # > reiserfs_vfsops.c reiserfs_vnops.c # > +.if ${MACHINE_ARCH} == "amd64" # > +CFLAGS+= -minline-all-stringops # > +.endif # Unfortunately we really don't like to put this type of CFLAGS in non-*.mk # files. Since we know the GCC 3.4.2 compiler bugs will be fixed, I # suggest we just document this issue and be happy that otherwise the code # is ready to go on FreeBSD/amd64. # -- David (obrien @ FreeBSD.org) # CFLAGS += -DMIME7TO8 # On by default in # /usr/src/contrib/sendmail/src/conf.h # so does not change content of # /usr/obj/usr/src/usr.sbin/sendmail/deliver.o # with # cd /usr/src/usr.sbin/sendmail ; make # For cross compiling: # CFLAGS += -march=i686 # CFLAGS += -march=i586 # CFLAGS += -mtune=i586 # -march is the one I know, but 2008.05 I saw -mtune # CFLAGS += -DSTART_MAKE_CONF -march=i686 -DEND_MAKE_CONF # See /usr/share/mk/bsd.cpu.mk # CPUTYPE=pentium-mmx # CPUTYPE=pentium # added by use.perl 2009-11-15 13:15:33 # PERL_VERSION=5.8.9 # I'm using make buildkernel everytime. # Is there a faster method of recompiling? # make buildkernel KERNCONF=FOO # first time # make buildkernel KERNFAST=FOO # after that # Note from 8.1-RC2 ports/emulators/virtualbox-ose # I''ll move this note somewhere better when I decide where: # Requires 32-bit libraries installed under /usr/lib32. # Do: cd /usr/src; make build32 install32; ldconfig -v -m -R /usr/lib32 #------------------------------------------------------------------------------ # Subject: [FreeBSD-Ports-Announce] [CFT/HEADSUP] Ports now have Stack # Protector support # From: Bryan Drewery # Date: Sat, 21 Sep 2013 05:49:49 -0500 (12:49 CEST) # To: ports-announce@freebsd.org # # WITH_SSP=yes # Subject: [FreeBSD-Ports-Announce] [CFT/HEADSUP] Ports now have Stack # Protector support # From: Bryan Drewery # Date: Sat, 21 Sep 2013 05:49:49 -0500 (12:49 CEST) # To: ports-announce@freebsd.org # # (multipart/signed) # Query keyserver # Signature made Sat Sep 21 12:49:49 2013 CEST using RSA key ID 3C9B0CF9 # Can't check signature: public key not found # # (text/plain) # Ports now support enabling Stack Protector [1] support on FreeBSD 10 # i386 and amd64, and older releases on amd64 only currently. # # Support may be added for earlier i386 releases once all ports properly # respect LDFLAGS. # # To enable, just add WITH_SSP=yes to your make.conf and rebuild all ports. # # The default SSP_CLFAGS is -fstack-protector, but -fstack-protector-all # may optionally be set instead. # # Please help test this on your system. We would like to eventually enable # this by default, but need to identify any major ports that have run-time # issues due to it. # # [1] https://en.wikipedia.org/wiki/Buffer_overflow_protection # Added 2014-05-15 for building firefox: Commented out 2015-06-06, untested. # Ref: /usr/ports/Mk/bsd.port.mk # DISABLE_MAKE_JOBS=YES # - Set to disable the multiple jobs feature. User settable. # GSSAPI: Generic Security Services Application Program Interface # http://en.wikipedia.org/wiki/Generic_Security_Services_Application_Program_Interface # /usr/ports/Mk/Uses/gssapi.mk: # You are using OpenSSL from ports and have selected # GSSAPI from base, please select another GSSAPI value. # cd /usr/ports/security/openssl; echo ../*ssl* # SSL_DEFAULT=base # Disapproved of by # /usr/ports/Mk/bsd.default-versions.mk # which instead reccomends: # DEFAULT_VERSIONS+=ssl=base # DEFAULT_VERSIONS+=ssl=openssl # Possible values: base, openssl, openssl-devel, libressl, libressl-devel # & also has: # WITH_OPENSSL_* # DEFAULT_VERSIONS+=ssl=openssl # WITH_OPENSSL="YES" # WITH_OPENSSL="openssl" # WITH_OPENSSL_PORT="YES" # WITH_OPENSSL_PORT="openssl" # SEE ALSO # /etc/src.conf (used only by src/), # whereas this make.conf used by both src/ & ports/. # https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/openssl.html # WITH_OPENSSL_PORT WITH_OPENSSL_BASE # man 7 ports # /usr/ports/Mk/Uses/gssapi.mk # /usr/ports/Mk/Uses/bsd.default-versions.mk # /usr/ports/Mk/Uses/ssl.mk # /usr/ports/security/openssl # From Don Lewis Wed Nov 30 19:28:32 UTC 2016 # https://lists.freebsd.org/pipermail/freebsd-ports/2016-November/105955.html # This is what I use in /etc/make.conf to build ports with openssl from ports: # WITH_OPENSSL_PORT=yes # Mon Feb 5 01:25:44 CET 2018 # FreeBSD lapr.js.berklix.net 12.0-CURRENT FreeBSD 12.0-CURRENT #13378: Mon Feb 5 00:03:35 CET 2018 jhs@lapr.js.berklix.net:/usr/src/sys/amd64/compile/LAPR.small amd64 # WITH_OPENSSL_PORT is unsupported, please use DEFAULT_VERSIONS+=ssl=openssl # in your make.conf DEFAULT_VERSIONS+=ssl=openssl# match to installed ports/security/openssl OPTIONS_SET=GSSAPI_NONE KRB_NONE OPTIONS_UNSET=GSSAPI_BASE KRB_BASE KERBEROS # The GSSAPI and KERBEROS adjustments are needed because openssl from # ports can't be combined with base gssapi / kerberos. GSSAPI_HEIMDAL or # GSSAPI_MIT should also work, likewise KRB_HEIMDAL or KRB_MIT. # CFLAGS += -DJHSJHSX=JHSJHSX # CFLAGS += -DJHSJHSY=JHSJHSY # CFLAGS += -g # For gdb debugger # CFLAGS += -pipe # Not enough swap on Park for this. 96 MB on Mart. # CFLAGS += -static # For gdb debugger & /usr/ports/sysutils/ntfsprogs # CFLAGS += -static-libgcc # DEVELOPER=yes to /etc/make.conf # LDFLAGS += -static MK_TESTS="no" # Added 2019-07-10, shuld I move this to src.conf # MK_TESTS: cd /usr/src/share/mk; \ # vi -c/MK_TESTS Makefile bsd.crunchgen.mk src.opts.mk