Skip to content

Commit

Permalink
add fpic #214
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jun 26, 2023
1 parent b276eb4 commit 3d5dbfa
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1587,8 +1587,12 @@ _get_target_toolchain_flags_for_gcc() {
flags="${flags} -m32"
fi
_get_target_item "${name}" "kind"; local targetkind="${_ret}"
if test_eq "${targetkind}" "shared" && test_eq "${toolkind}" "sh"; then
flags="${flags} -shared -fPIC"
if test_eq "${targetkind}" "shared"; then
if test_eq "${toolkind}" "sh"; then
flags="${flags} -shared -fPIC"
elif test_eq "${toolkind}" "cc" || test_eq "${toolkind}" "cxx"; then
flags="${flags} -fPIC"
fi
fi
_ret="${flags}"
}
Expand All @@ -1602,8 +1606,12 @@ _get_target_toolchain_flags_for_clang() {
flags="${flags} -m32"
fi
_get_target_item "${name}" "kind"; local targetkind="${_ret}"
if test_eq "${targetkind}" "shared" && test_eq "${toolkind}" "sh"; then
flags="${flags} -shared -fPIC"
if test_eq "${targetkind}" "shared"; then
if test_eq "${toolkind}" "sh"; then
flags="${flags} -shared -fPIC"
elif test_eq "${toolkind}" "cc" || test_eq "${toolkind}" "cxx"; then
flags="${flags} -fPIC"
fi
fi
if is_plat "macosx"; then
_os_iorunv "xcrun" "-sdk" "macosx" "--show-sdk-path"; local sdkdir="${_ret}"
Expand Down

0 comments on commit 3d5dbfa

Please sign in to comment.