[build] use -pipe with gcc and clang

This commit is contained in:
Glenn Strauss 2021-02-07 18:03:38 -05:00
parent 603a1fa573
commit 457d78c6e1
4 changed files with 4 additions and 3 deletions

View File

@ -291,7 +291,7 @@ env['package'] = package
env['version'] = version
if env['CC'] == 'gcc':
## we need x-open 6 and bsd 4.3 features
env.Append(CCFLAGS = Split('-Wall -O2 -g -W -pedantic -Wunused -Wshadow -std=gnu99'))
env.Append(CCFLAGS = Split('-pipe -Wall -O2 -g -W -pedantic -Wunused -Wshadow -std=gnu99'))
env.Append(CPPFLAGS = [
'-D_FILE_OFFSET_BITS=64',

View File

@ -1636,7 +1636,7 @@ fi
AC_MSG_NOTICE([----------------------------------------])
dnl check for extra compiler options (warning options)
if test "${GCC}" = yes; then
TRY_CFLAGS([-Wall -W -Wshadow -pedantic])
TRY_CFLAGS([-pipe -Wall -W -Wshadow -pedantic])
fi
AC_ARG_ENABLE([extra-warnings],

View File

@ -1114,7 +1114,7 @@ if(HAVE_XXHASH)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -g -Wshadow -W -pedantic ${WARN_CFLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pipe -Wall -g -Wshadow -W -pedantic ${WARN_CFLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2")

View File

@ -786,6 +786,7 @@ common_cflags = defs + [
if compiler.get_id() == 'gcc' or compiler.get_id() == 'clang'
common_cflags += [
'-pipe',
'-Wall',
'-g',
'-Wshadow',