[pkg-d-commits] [ldc] 01/03: New upstream version 1.1.1

Matthias Klumpp mak at moszumanska.debian.org
Fri Mar 3 19:14:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to branch master
in repository ldc.

commit dd843e871f9053a5ce16f8808d7edad9c378e0b0
Author: Matthias Klumpp <mak at debian.org>
Date:   Fri Mar 3 19:47:51 2017 +0100

    New upstream version 1.1.1
---
 CMakeLists.txt         |  2 +-
 runtime/CMakeLists.txt | 26 ++++++++++++++++++++------
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 475b1e0..3ddda24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,7 +54,7 @@ endfunction()
 #
 
 # Version information
-set(LDC_VERSION "1.1.0") # May be overridden by git hash tag
+set(LDC_VERSION "1.1.1") # May be overridden by git hash tag
 set(DMDFE_MAJOR_VERSION   2)
 set(DMDFE_MINOR_VERSION   0)
 set(DMDFE_PATCH_VERSION   71)
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index ff9da8f..3d79702 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -388,6 +388,24 @@ macro(compile_phobos2 d_flags lib_suffix path_suffix outlist_o outlist_bc)
     endforeach()
 endmacro()
 
+# Sets the common properties for all library targets.
+function(set_common_library_properties target)
+    set_target_properties(${target} PROPERTIES
+        VERSION ${DMDFE_VERSION}
+        SOVERSION ${DMDFE_PATCH_VERSION}
+        LINKER_LANGUAGE C
+    )
+
+    # ldc2 defaults to position-independent code on Linux to match the implicit
+    # linker default on Ubuntu 16.10 and above. As we might be building on an
+    # older system (e.g. binary packages), we need to make sure the C parts are
+    # built as PIC as well.
+    if(${CMAKE_SYSTEM} MATCHES "Linux")
+        set_target_properties(${target} PROPERTIES
+            POSITION_INDEPENDENT_CODE ON)
+    endif()
+endfunction()
+
 # Builds a copy of druntime/Phobos from the source files gathered above. The
 # names of the added library targets are appended to outlist_targets.
 macro(build_runtime d_flags c_flags ld_flags lib_suffix path_suffix outlist_targets)
@@ -402,15 +420,13 @@ macro(build_runtime d_flags c_flags ld_flags lib_suffix path_suffix outlist_targ
     set_target_properties(
         druntime-ldc${target_suffix} PROPERTIES
         OUTPUT_NAME                 druntime-ldc${lib_suffix}
-        VERSION                     ${DMDFE_VERSION}
-        SOVERSION                   ${DMDFE_PATCH_VERSION}
-        LINKER_LANGUAGE             C
         ARCHIVE_OUTPUT_DIRECTORY    ${output_path}
         LIBRARY_OUTPUT_DIRECTORY    ${output_path}
         RUNTIME_OUTPUT_DIRECTORY    ${output_path}
         COMPILE_FLAGS               "${c_flags}"
         LINK_FLAGS                  "${ld_flags}"
     )
+    set_common_library_properties(druntime-ldc${target_suffix})
 
     # When building a shared library, we need to link in all the default
     # libraries otherwise implicitly added by LDC to make it loadable from
@@ -436,15 +452,13 @@ macro(build_runtime d_flags c_flags ld_flags lib_suffix path_suffix outlist_targ
         set_target_properties(
             phobos2-ldc${target_suffix} PROPERTIES
             OUTPUT_NAME                 phobos2-ldc${lib_suffix}
-            VERSION                     ${DMDFE_VERSION}
-            SOVERSION                   ${DMDFE_PATCH_VERSION}
-            LINKER_LANGUAGE             C
             ARCHIVE_OUTPUT_DIRECTORY    ${output_path}
             LIBRARY_OUTPUT_DIRECTORY    ${output_path}
             RUNTIME_OUTPUT_DIRECTORY    ${output_path}
             COMPILE_FLAGS               "${c_flags}"
             LINK_FLAGS                  "${ld_flags}"
         )
+        set_common_library_properties(phobos2-ldc${target_suffix})
 
         if(BUILD_SHARED_LIBS)
             # TODO: As for druntime, adapt once shared libraries are supported

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list