alicelinux

A lightweight musl + clang/llvm + libressl + busybox distro
git clone https://codeberg.org/emmett1/alicelinux
Log | Files | Refs | README | LICENSE

clang.patch (2521B)


      1 Clang has -nostdlib++, which can be used more effectively than disabling
      2 all and then hardcoding linking against libgcc (which we do not have)
      3 
      4 --- a/src/CMakeLists.txt
      5 +++ b/src/CMakeLists.txt
      6 @@ -105,7 +105,7 @@ set_target_properties(graphite2 PROPERTIES  PUBLIC_HEADER "${GRAPHITE_HEADERS}"
      7  if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
      8      set_target_properties(graphite2 PROPERTIES
      9          COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
     10 -        LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
     11 +        LINK_FLAGS      "-nostdlib++ ${GRAPHITE_LINK_FLAGS}"
     12          LINKER_LANGUAGE C)
     13      if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
     14          add_definitions(-mfpmath=sse -msse2)
     15 @@ -117,19 +117,7 @@ if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     16      if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
     17          add_definitions(-Wimplicit-fallthrough -Wshorten-64-to-32)
     18      endif()
     19 -    if (${CMAKE_CXX_COMPILER} MATCHES  ".*mingw.*")
     20 -        target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32)
     21 -    else (${CMAKE_CXX_COMPILER} MATCHES  ".*mingw.*")
     22 -        if (GRAPHITE2_SANITIZERS)
     23 -            target_link_libraries(graphite2 c gcc_s)
     24 -        else ()
     25 -            target_link_libraries(graphite2 c gcc)
     26 -        endif ()
     27 -    endif()
     28      include(Graphite)
     29 -    if (BUILD_SHARED_LIBS)
     30 -        nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
     31 -    endif ()
     32      set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
     33      CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
     34  endif()
     35 --- a/tests/CMakeLists.txt
     36 +++ b/tests/CMakeLists.txt
     37 @@ -47,12 +47,12 @@ else (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
     38      set_target_properties(graphite2-base PROPERTIES
     39          COMPILE_FLAGS       "-Wall -Wextra -Wno-class-memaccess -fno-rtti -fno-exceptions"
     40          COMPILE_DEFINITIONS "GRAPHITE2_NTRACING"
     41 -        LINK_FLAGS          "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
     42 +        LINK_FLAGS          "-nostdlib++ ${GRAPHITE_LINK_FLAGS}"
     43          LINKER_LANGUAGE     C)
     44      set_target_properties(graphite2-file PROPERTIES
     45          COMPILE_FLAGS       "-Wall -Wextra  -Wno-class-memaccess -fno-rtti -fno-exceptions"
     46          COMPILE_DEFINITIONS "GRAPHITE2_NTRACING${TELEMETRY}"
     47 -        LINK_FLAGS          "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
     48 +        LINK_FLAGS          "-nostdlib++ ${GRAPHITE_LINK_FLAGS}"
     49          LINKER_LANGUAGE     C)
     50  endif()
     51