Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 379849 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +15 lines)
Line  Link Here
0
-- a/Makefile
0
++ b/Makefile
Lines 7-12 Link Here
7
# for compatibility with old releases
7
# for compatibility with old releases
8
CFLAGS += ${OPT_CFLAGS}
8
CFLAGS += ${OPT_CFLAGS}
9
override CFLAGS += -I.
9
override CFLAGS += -I.
10
# build static libraries by default
11
BUILD_STATIC ?= yes
10
12
11
# find out if compiler supports __thread
13
# find out if compiler supports __thread
12
THREAD_SUPPORT := $(shell if $(CC) $(CFLAGS) threadtest.c -o threadtest \
14
THREAD_SUPPORT := $(shell if $(CC) $(CFLAGS) threadtest.c -o threadtest \
Lines 24-29 Link Here
24
26
25
CLEANFILES := numactl.o libnuma.o numactl numademo numademo.o distance.o \
27
CLEANFILES := numactl.o libnuma.o numactl numademo numademo.o distance.o \
26
	      memhog libnuma.so libnuma.so.1 numamon numamon.o syscall.o bitops.o \
28
	      memhog libnuma.so libnuma.so.1 numamon numamon.o syscall.o bitops.o \
29
	      distance.pic.o libnuma.pic.o syscall.pic.o \
27
	      memhog.o util.o stream_main.o stream_lib.o shm.o stream clearcache.o \
30
	      memhog.o util.o stream_main.o stream_lib.o shm.o stream clearcache.o \
28
	      test/pagesize test/tshared test/mynode.o test/tshared.o mt.o empty.o empty.c \
31
	      test/pagesize test/tshared test/mynode.o test/tshared.o mt.o empty.o empty.c \
29
	      test/mynode test/ftok test/prefered test/randmap \
32
	      test/mynode test/ftok test/prefered test/randmap \
Lines 40-49 Link Here
40
libdir := ${prefix}/$(shell ./getlibdir)
43
libdir := ${prefix}/$(shell ./getlibdir)
41
docdir := ${prefix}/share/doc
44
docdir := ${prefix}/share/doc
42
45
46
NUMA_LIBS = libnuma.so
47
ifeq ($(BUILD_STATIC),yes)
48
NUMA_LIBS+= libnuma.a
49
endif
50
43
all: numactl migratepages migspeed libnuma.so numademo numamon memhog \
51
all: numactl migratepages migspeed libnuma.so numademo numamon memhog \
44
     test/tshared stream test/mynode test/pagesize test/ftok test/prefered \
52
     test/tshared stream test/mynode test/pagesize test/ftok test/prefered \
45
     test/randmap test/nodemap test/distance test/tbitmap test/move_pages \
53
     test/randmap test/nodemap test/distance test/tbitmap test/move_pages \
46
     test/mbind_mig_pages test/migrate_pages test/realloc_test libnuma.a
54
     test/mbind_mig_pages test/migrate_pages test/realloc_test ${NUMA_LIBS}
47
55
48
numactl: numactl.o util.o shm.o bitops.o libnuma.so
56
numactl: numactl.o util.o shm.o bitops.o libnuma.so
49
57
Lines 81-93 Link Here
81
89
82
libnuma.so.1: versions.ldscript
90
libnuma.so.1: versions.ldscript
83
91
84
libnuma.so.1: libnuma.o syscall.o distance.o
92
libnuma.so.1: libnuma.pic.o syscall.pic.o distance.pic.o
85
	${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -Wl,-fini,numa_fini -o libnuma.so.1 $(filter-out versions.ldscript,$^)
93
	${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -Wl,-fini,numa_fini -o libnuma.so.1 $(filter-out versions.ldscript,$^)
86
94
87
libnuma.so: libnuma.so.1
95
libnuma.so: libnuma.so.1
88
	ln -sf libnuma.so.1 libnuma.so
96
	ln -sf libnuma.so.1 libnuma.so
89
97
90
libnuma.o : CFLAGS += -fPIC
98
%.pic.o: %.c
99
	${CC} -fPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@
91
100
92
AR ?= ar
101
AR ?= ar
93
RANLIB ?= ranlib
102
RANLIB ?= ranlib
Lines 95-104 Link Here
95
	$(AR) rc $@ $^
104
	$(AR) rc $@ $^
96
	$(RANLIB) $@
105
	$(RANLIB) $@
97
106
98
distance.o : CFLAGS += -fPIC
99
100
syscall.o : CFLAGS += -fPIC
101
102
test/tshared: test/tshared.o libnuma.so
107
test/tshared: test/tshared.o libnuma.so
103
108
104
test/mynode: test/mynode.o libnuma.so
109
test/mynode: test/mynode.o libnuma.so
Lines 143-149 Link Here
143
	mkdir -p ${libdir}
148
	mkdir -p ${libdir}
144
	install -m 0755 libnuma.so.1 ${libdir}
149
	install -m 0755 libnuma.so.1 ${libdir}
145
	cd ${libdir} ; ln -sf libnuma.so.1 libnuma.so
150
	cd ${libdir} ; ln -sf libnuma.so.1 libnuma.so
151
ifeq ($(BUILD_STATIC),yes)
146
	install -m 0644 libnuma.a ${libdir}
152
	install -m 0644 libnuma.a ${libdir}
153
endif
147
	mkdir -p ${prefix}/include
154
	mkdir -p ${prefix}/include
148
	install -m 0644 numa.h numaif.h numacompat1.h ${prefix}/include
155
	install -m 0644 numa.h numaif.h numacompat1.h ${prefix}/include
149
	install -m 0755 numastat ${prefix}/bin
156
	install -m 0755 numastat ${prefix}/bin

Return to bug 379849