Browse Source

[build] use -pipe with gcc and clang

master
Glenn Strauss 3 weeks ago
parent
commit
457d78c6e1
4 changed files with 4 additions and 3 deletions
  1. +1
    -1
      SConstruct
  2. +1
    -1
      configure.ac
  3. +1
    -1
      src/CMakeLists.txt
  4. +1
    -0
      src/meson.build

+ 1
- 1
SConstruct 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',


+ 1
- 1
configure.ac 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],


+ 1
- 1
src/CMakeLists.txt 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")


+ 1
- 0
src/meson.build 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',


Loading…
Cancel
Save