[Bug 257727] 12.2/13.0: MK_RETPOLINE always prints NO

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 10 Aug 2021 07:01:24 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257727

            Bug ID: 257727
           Summary: 12.2/13.0: MK_RETPOLINE always prints NO
           Product: Base System
           Version: Unspecified
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: conf
          Assignee: bugs_at_FreeBSD.org
          Reporter: i.dani_at_outlook.com

Steps to reproduce:
- Set in /etc/src.conf:
WITH_KERNEL_RETPOLINE=
WITH_RETPOLINE=
- Run "make buildworld" or make "buildkernel"
- Printed output(MK_RETPOLINE=no):
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/src; INSTALL="sh /usr/src/tools/install.sh" 
TOOLS_PREFIX=/usr/obj/usr/src/amd64.amd64/tmp 
PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/libexec:/sbin:/bin:/usr/sbin:/usr/bin
 WORLDTMP=/usr/obj/usr/src/amd64.amd64/tmp  MAKEFLAGS="-m
/usr/src/tools/build/mk  -j 8 -J 15,16 -m /usr/src/share/mk" make  -f
Makefile.inc1  DESTDIR=  OBJTOP='/usr/obj/usr/src/amd64.amd64/tmp/obj-tools' 
OBJROOT='${OBJTOP}/'  MAKEOBJDIRPREFIX=  BOOTSTRAPPING=1300514 
BWPHASE=bootstrap-tools  SSP_CFLAGS=  MK_HTML=no NO_LINT=yes MK_MAN=no
MK_MAN_UTILS=yes  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS
MK_WERROR=no MK_CTF=no  MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no 
MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no  MK_INCLUDES=yes MK_LLVM_TARGET_ALL=no
bootstrap-tool

- The build commands still look fine (-mretpoline is set):
cc -target x86_64-unknown-freebsd12.2
--sysroot=/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing 
-g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include
-I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include
opt_global.h -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-MD  -MF.depend.cam_iosched.o -MTcam_iosched.o
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding
-fwrapv -fstack-protector -mretpoline -gdwarf-2 -Wall -Wredundant-decls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-e--- cam_periph.o ---

What we tested (thanks to the freebsd irc channel):
- WITH_RETPOLINE=, WITH_RETPOLINE=yes and WITH_RETPOLINE=YES in src.conf
- FSBD 12.2 RELEASE, FBSD 13.0 STABLE / RELEASE

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Tue Aug 10 2021 - 07:01:24 UTC

Original text of this message