Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 95291c1

Browse files
authored
Merge pull request #6953 from livecode/feature-linux-prebuilt-pic
[[ Prebuilt ]] Build Linux prebuilt libraries with position-independant code
2 parents e7f9f9b + 17637ac commit 95291c1

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

config/linux-settings.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
'target_conditions':
3131
[
3232
[
33-
'_type == "loadable_module" or _type == "shared_library" or (_type == "static_library" and library_for_module != 0)',
33+
'_type' == "executable" or '_type == "loadable_module" or _type == "shared_library" or (_type == "static_library" and library_for_module != 0)',
3434
{
3535
'cflags':
3636
[

prebuilt/scripts/build-curl.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ cd "%CURL_SRC%"
4444
cd winbuild
4545

4646
ECHO Preparing Curl for %BUILDTRIPLE%
47-
SET OPENSSL_TBZ=%_PACKAGE_DIR%\OpenSSL-%OpenSSL_VERSION%-%BUILDTRIPLE%.tar.bz2
47+
IF DEFINED OpenSSL_BUILDREVISION (
48+
SET OPENSSL_TBZ=%_PACKAGE_DIR%\OpenSSL-%OpenSSL_VERSION%-%BUILDTRIPLE%-%OpenSSL_BUILDREVISION%.tar.bz2
49+
) ELSE (
50+
SET OPENSSL_TBZ=%_PACKAGE_DIR%\OpenSSL-%OpenSSL_VERSION%-%BUILDTRIPLE%.tar.bz2
51+
)
52+
4853
IF NOT EXIST %OPENSSL_TBZ% (
4954
ECHO OpenSSL must be built before Curl
5055
EXIT /B 1

prebuilt/scripts/platform.inc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,17 @@ function setCCForTarget {
114114
else
115115
CC_FLAGS_X86_NORELAX=
116116
fi
117-
echo "*DEBUG* CC_FLAGS: ${CC_FLAGS_X86_NORELAX}"
117+
118+
CC_FLAGS="-fPIC ${CC_FLAGS_X86_NORELAX}"
119+
120+
echo "*DEBUG* CC_FLAGS: ${CC_FLAGS}"
118121

119122
if [ "${ARCH}" == "x86_64" ] ; then
120-
CC="${CC_BASE} -m64 ${CC_FLAGS_X86_NORELAX}"
121-
CXX="${CXX_BASE} -m64 ${CC_FLAGS_X86_NORELAX}"
123+
CC="${CC_BASE} -m64 ${CC_FLAGS}"
124+
CXX="${CXX_BASE} -m64 ${CC_FLAGS}"
122125
elif [ "$1" == "x86" ] ; then
123-
CC="${CC_BASE} -m32 ${CC_FLAGS_X86_NORELAX}"
124-
CXX="${CXX_BASE} -m32 ${CC_FLAGS_X86_NORELAX}"
126+
CC="${CC_BASE} -m32 ${CC_FLAGS}"
127+
CXX="${CXX_BASE} -m32 ${CC_FLAGS}"
125128
fi
126129
;;
127130
android)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PIC
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
1-PIC
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PIC

0 commit comments

Comments
 (0)