Date: Sat, 16 Mar 2019 04:38:58 +0300 From: Rozhuk Ivan <rozhuk.im@gmail.com> To: freebsd-ports@freebsd.org Cc: Rozhuk Ivan <Rozhuk.IM@gmail.com> Subject: /etc/make.conf included twice by FreeBSD make Message-ID: <20190316043858.16c5a933@rimwks>
next in thread | raw e-mail | index | archive | help
Hello! I spent some time while debugging math/mprime build, then build: ... cc -O2 -pipe -O2 -DSTRIP_FBSDID -pipe -D_FORTIFY_SOURCE=2 -mretpoline -fstack-protector-all -fno-strict-aliasing -O2 -DSTRIP_FBSDID -pipe -D_FORTIFY_SOURCE=2 -mretpoline -I.. -I../sqlite-amalgamation-3180000 -DX86_64 -c gwnum.c ... where: -O2 -pipe - from /usr/share/mk/sys.mk -O2 -DSTRIP_FBSDID -pipe -D_FORTIFY_SOURCE=2 -mretpoline - mine /etc/make.conf -fstack-protector-all -fno-strict-aliasing - from /usr/ports/Mk/bsd.port.mk, /usr/ports/Mk/bsd.ssp.mk -I.. -I../sqlite-amalgamation-3180000 -DX86_64 -c gwnum.c - port makefile this options added twice: -O2 -DSTRIP_FBSDID -pipe -D_FORTIFY_SOURCE=2 -mretpoline first time then you call make to on Makefile in ports tree, second then ports trying to build port. If use gmake to build port then this not happen. This can be problem, because ports build system does not control CFLAGS and other staff that in /etc/make.conf. For example if you try build mprime using gcc - it fail, because gcc does not support -mretpoline. /usr/ports/Mk/bsd.gcc.mk - handle this and remove first -mretpoline, but second -mretpoline added after run MAKE_CMD. To prevent second include /etc/make.conf this must be done: __MAKE_CONF=/dev/null It can be added to /etc/make.conf, /usr/ports/Mk/bsd.port.mk or port Makefile. Some ports already done this. I add to /etc/make.conf and buld dozen ports without isses. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236565
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190316043858.16c5a933>