diff mbox

libcacard: fix compile error on glib2-2.12.3-4.el5

Message ID 1411780438-7472-1-git-send-email-zwu.kernel@gmail.com
State New
Headers show

Commit Message

Zhiyong Wu Sept. 27, 2014, 1:13 a.m. UTC
From: Zhi Yong Wu <zhiyong.wzy@alibaba-inc.com>

lt LINK libcacard.la
  CC    libcacard/vscclient.o
lt LINK vscclient
/usr/bin/ld: -f may not be used without -shared
collect2: ld returned 1 exit status
make: *** [vscclient] Error 1

Signed-off-by: Zhi Yong Wu <zhiyong.wzy@alibaba-inc.com>
---
 libcacard/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Paolo Bonzini Sept. 30, 2014, 6:53 a.m. UTC | #1
Il 27/09/2014 03:13, zwu.kernel@gmail.com ha scritto:
> From: Zhi Yong Wu <zhiyong.wzy@alibaba-inc.com>
> 
> lt LINK libcacard.la
>   CC    libcacard/vscclient.o
> lt LINK vscclient
> /usr/bin/ld: -f may not be used without -shared
> collect2: ld returned 1 exit status
> make: *** [vscclient] Error 1
> 
> Signed-off-by: Zhi Yong Wu <zhiyong.wzy@alibaba-inc.com>
> ---
>  libcacard/Makefile |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/libcacard/Makefile b/libcacard/Makefile
> index 0e7903f..40f7a28 100644
> --- a/libcacard/Makefile
> +++ b/libcacard/Makefile
> @@ -1,5 +1,6 @@
>  libcacard_includedir=$(includedir)/cacard
> -
> +CFLAGS += -fPIC
> +LDFLAGS += $(LDFLAGS_SHARED)
>  TOOLS += vscclient$(EXESUF)

This is included into the main Makefile, so please do the change there.

Paolo

>  # objects linked into a shared library, built with libtool with -fPIC if required
>
diff mbox

Patch

diff --git a/libcacard/Makefile b/libcacard/Makefile
index 0e7903f..40f7a28 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -1,5 +1,6 @@ 
 libcacard_includedir=$(includedir)/cacard
-
+CFLAGS += -fPIC
+LDFLAGS += $(LDFLAGS_SHARED)
 TOOLS += vscclient$(EXESUF)
 
 # objects linked into a shared library, built with libtool with -fPIC if required