diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-04-11 14:14:11 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-04-11 14:14:11 +0100 |
commit | 90b969c2ede4bd5ba3722d0f2a71a77d8380bf80 (patch) | |
tree | d80784684a262b3dd427ba9895780af6cc8f19b5 /tools/libxc | |
parent | 862bf6424b9cd460b337cb5e47f16d3581970ff2 (diff) | |
download | xen-90b969c2ede4bd5ba3722d0f2a71a77d8380bf80.tar.gz xen-90b969c2ede4bd5ba3722d0f2a71a77d8380bf80.tar.bz2 xen-90b969c2ede4bd5ba3722d0f2a71a77d8380bf80.zip |
tools: Correct PTHREAD options in config/StdGNU.mk
It is not correct to say -lpthread. The correct option is -pthread,
which may have sundry other effects on code generation etc. It needs
to be passed both to compilation and linking.
Fix the configure test to test -pthread, and plumb the resulting flag
through to PTHREAD_{CFLAGS,LDFLAGS} in Tools.mk; also substitute
PTHREAD_LIBS (although this will currently always be empty).
Remove PTHREAD_LIBS setting from StdGNU.mk.
Fix the one user (libxc) to use PTHREAD_{CFLAGS,LDFLAGS} too.
There are still some other users in tree which pass -pthread or
-lpthread by adding it as a literal to their own compiler options.
These will be fixed in a later patch.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc')
-rw-r--r-- | tools/libxc/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index 55eb755059..a1ba13402b 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -73,6 +73,8 @@ CFLAGS += -I. $(CFLAGS_xeninclude) # Needed for posix_fadvise64() in xc_linux.c CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE +CFLAGS += $(PTHREAD_CFLAGS) + # Define this to make it possible to run valgrind on code linked with these # libraries. #CFLAGS += -DVALGRIND -O0 -ggdb3 @@ -157,7 +159,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR) ln -sf $< $@ libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS) - $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS) $(APPEND_LDFLAGS) # libxenguest |