Skip to content

Commit 5262391

Browse files
author
Doug Greiman
committed
Tweak Debian flags based on manually compiling .deb package
1 parent 89bc0b9 commit 5262391

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎python-interpreter-builder/scripts/build-python-3.5.sh‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ cd Python-3.5.3
6767
# (Debian) Security hardening
6868
# CFLAGS=-g
6969
# (Debian) More debug info
70-
# CFLAGS=-O2
71-
# (Debian) the default is -O3, don't know why the difference
7270
# CFLAGS=-Wformat -Werror=format-security
7371
# (Debian) Security hardening
7472
# CPPFLAGS=-D_FORTIFY_SOURCE=2
@@ -113,7 +111,6 @@ cd build-static
113111
CFLAGS="\
114112
-fstack-protector-strong \
115113
-g \
116-
-O2 \
117114
-Wformat -Werror=format-security \
118115
" \
119116
CPPFLAGS="\
@@ -125,13 +122,16 @@ cd build-static
125122
RANLIB="x86_64-linux-gnu-gcc-ranlib" \
126123

127124
# Explicitly build the profile-guided-optimized interpreter
128-
EXTRA_OPT_CFLAGS="-g -flto -fuse-linker-plugin -ffat-lto-objects"
129-
NUM_JOBS=$(nproc)
130-
make -j"$NUM_JOBS" EXTRA_CFLAGS="${EXTRA_OPT_CFLAGS}" profile-opt
131-
make -j"$NUM_JOBS" EXTRA_CFLAGS="${EXTRA_OPT_CFLAGS}" test
125+
NUM_JOBS="$(nproc)"
126+
make \
127+
-j"${NUM_JOBS}" \
128+
EXTRA_CFLAGS="-g -flto -fuse-linker-plugin -ffat-lto-objects" \
129+
PROFILE_TASK='../Lib/test/regrtest.py -s -j 1 -unone,decimal -x test_cmd_line_script test_compiler test_concurrent_futures test_ctypes test_dbm_dumb test_dbm_ndbm test_distutils test_ensurepip test_gdb test_ioctl test_linuxaudiodev test_multiprocessing test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_ossaudiodev test_pydoc test_signal test_socket test_socketserver test_subprocess test_sundry test_thread test_threaded_import test_threadedtempfile test_threading test_threading_local test_threadsignals test_venv test_zipimport_support' \
130+
profile-opt
131+
132132
make altinstall
133133

134134
# Clean-up sources
135-
cd /
135+
cd /opt
136136
rm /opt/sources/Python-3.5.3.tgz
137137
rm -r /opt/sources/Python-3.5.3

0 commit comments

Comments
 (0)