summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-02-15 15:33:19 -0800
committerGuy Harris <gharris@sonic.net>2023-02-15 15:33:19 -0800
commit65fdbf976cbe2742e2a8f3b961ce99ab24080752 (patch)
tree9bce90808d53efaded676c663d7da0b95d10f425
parent8eead5b0b34b0f985acad71a7af93e0a94681fab (diff)
downloadlibpcap-65fdbf976cbe2742e2a8f3b961ce99ab24080752.tar.gz
configure, CMake: remove -fPIC hacks for Haiku.
As of llvm12_clang-12.0.1-5, Clang defaults to generating PIC, just as GCC does, and the entire matrix now works.
-rw-r--r--CMakeLists.txt38
-rw-r--r--configure.ac23
2 files changed, 2 insertions, 59 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b7a02e2..80f096fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,20 +4,7 @@ if(WIN32)
# below.
#
cmake_minimum_required(VERSION 3.12)
-elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Haiku")
- #
- # We need 3.7 or later, so we can use CMAKE_C_FLAGS_INIT; see
- # below.
- #
- # We test CMAKE_HOST_SYSTEM_NAME rather than CMAKE_SYSTEM_NAME,
- # because the former is set before project() is called (it's set
- # from the results of uname()), but the latter isn't set until
- # after project() returns, and we have to do those tests before
- # calling project() so we set CMAKE_C_FLAGS_INIT before calling
- # project().
- #
- cmake_minimum_required(VERSION 3.7)
-else()
+else(WIN32)
#
# For now, require only 2.8.12, just in case somebody is
# configuring with CMake on a "long-term support" version
@@ -25,7 +12,7 @@ else()
# CMake.
#
cmake_minimum_required(VERSION 2.8.12)
-endif()
+endif(WIN32)
#
# Apple doesn't build with an install_name starting with @rpath, and
@@ -74,27 +61,6 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
#
-# See above for why we test CMAKE_HOST_SYSTEM_NAME rather than
-# CMAKE_SYSTEM_NAME.
-#
-if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Haiku")
- #
- # On Haiku, all executables are built as shared objects,
- # and must have their code build as PIC.
- #
- # At least some versions of Haiku's GCC default to PIC,
- # with a -fno-pic option for cases where that's not desired.
- #
- # Clang hasn't been modified in that fashion, so Clang
- # builds of tcpdump fail. This is Haiku bug 18258.
- #
- # Force the use of -fPIC (even for GCC; adding -fPIC for GCC
- # won't break anything).
- #
- set(CMAKE_C_FLAGS_INIT "-fPIC")
-endif()
-
-#
# We explicitly indicate what languages are used in libpcap to avoid
# checking for a C++ compiler.
#
diff --git a/configure.ac b/configure.ac
index 0d757cdb..bba90851 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,29 +100,6 @@ AC_SUBST(LIBS_PRIVATE)
AC_CANONICAL_HOST
-case "$host_os" in
-
-haiku*)
- #
- # On Haiku, all executables are built as shared objects,
- # and must have their code build as PIC. This also
- # applies to code in static libraries, as well as
- # shared libraries, as executables may be linked
- # with that code.
- #
- # At least some versions of Haiku's GCC default to PIC,
- # with a -fno-pic option for cases where that's not desired.
- #
- # Clang hasn't been modified in that fashion, so Clang
- # builds of tcpdump fail. This is Haiku bug 18258.
- #
- # Force the use of -fPIC (even for GCC; adding -fPIC for GCC
- # won't break anything).
- #
- CFLAGS="$CFLAGS -fPIC"
- ;;
-esac
-
AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
#
# We require C99 or later.