[Bug 276170] LLVM bug prevents from enabling PGO optimization for Python 3.11+

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 31 Dec 2024 13:07:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276170

--- Comment #37 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to dmilith from comment #35)

Looking in the build log of the successful stable/14 build,
for example:

clang -pthread -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG
-g -fwrapv -O3 -Wall -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  
-flto -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter
-Wno-missing-field-initializers -Werror=implicit-function-declaration
-fvisibility=hidden -fprofile-instr-generate -I./Include/internal  -I.
-I./Include -I/usr/local/include -I/usr/local/include -fPIC -DPy_BUILD_CORE -o
Programs/python.o ./Programs/python.c

So both -O3 and -O2 were listed, in that order.

For reference:

--MAKE_ENV--
OPENSSLBASE=/usr OPENSSLDIR=/etc/ssl OPENSSLINC=/usr/include
OPENSSLLIB=/usr/lib XDG_DATA_HOME=/wrkdirs/usr/ports/lang/python310/work 
XDG_CONFIG_HOME=/wrkdirs/usr/ports/lang/python310/work 
XDG_CACHE_HOME=/wrkdirs/usr/ports/lang/python310/work/.cache 
HOME=/wrkdirs/usr/ports/lang/python310/work TMPDIR="/tmp"
PATH=/wrkdirs/usr/ports/lang/python310/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/lang/python310/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig
MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES
PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe 
-fstack-protector-strong -fno-strict-aliasing "  CPP="cpp"
CPPFLAGS="-I/usr/local/include -I/usr/local/include"  LDFLAGS="
-L/usr/local/lib  -fstack-protector-strong " LIBS="-L/usr/local/lib -lintl" 
CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  "
BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"
 BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644" 
BSD_INSTALL_MAN="install  -m 444"
--End MAKE_ENV--

which has both:

CFLAGS="-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing "
CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  "

-- 
You are receiving this mail because:
You are the assignee for the bug.