[2/4] configure: Don't add -fPIC to asflags when targeting windows

Message ID 1507796950-7328-2-git-send-email-martin@martin.st
State Committed
Commit 0ca66409911e9fba940424be8bdfa54e056b0a4b
Headers show

Commit Message

Martin Storsjö Oct. 12, 2017, 8:29 a.m.
On X86 windows, asflags weren't actually ever used for anything,
since assembling used x86asflags instead, and that flags list
had -DPIC already.

This fixes building shared libraries with clang for arm/aarch64
windows. (This wasn't an issue when in msvc mode before, since
we don't try to enable pic at all there, since the msvc armasm
assembler fails on our pic constructs there.)
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Diego Biurrun Oct. 12, 2017, 5:02 p.m. | #1
On Thu, Oct 12, 2017 at 11:29:08AM +0300, Martin Storsjö wrote:
> On X86 windows, asflags weren't actually ever used for anything,
> since assembling used x86asflags instead, and that flags list
> had -DPIC already.
> 
> This fixes building shared libraries with clang for arm/aarch64
> windows. (This wasn't an issue when in msvc mode before, since
> we don't try to enable pic at all there, since the msvc armasm
> assembler fails on our pic constructs there.)
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

Diego

Patch

diff --git a/configure b/configure
index 0d28b3b..82cd321 100755
--- a/configure
+++ b/configure
@@ -4262,9 +4262,9 @@  enable_weak_pic() {
         ;;
     *)
         add_cflags -fPIC
+        add_asflags -fPIC
         ;;
     esac
-    add_asflags  -fPIC
 }
 
 enabled pic && enable_weak_pic