Browse Source

[build] use -pipe with gcc and clang

master
Glenn Strauss 10 months ago
parent
commit
457d78c6e1
  1. 2
      SConstruct
  2. 2
      configure.ac
  3. 2
      src/CMakeLists.txt
  4. 1
      src/meson.build

2
SConstruct

@ -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',

2
configure.ac

@ -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],

2
src/CMakeLists.txt

@ -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")

1
src/meson.build

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

Loading…
Cancel
Save