diff options
Diffstat (limited to 'sys-apps/x86info/files/x86info-1.30-makefile.patch')
-rw-r--r-- | sys-apps/x86info/files/x86info-1.30-makefile.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sys-apps/x86info/files/x86info-1.30-makefile.patch b/sys-apps/x86info/files/x86info-1.30-makefile.patch new file mode 100644 index 000000000000..e1377c572fbd --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.30-makefile.patch @@ -0,0 +1,58 @@ +--- a/lsmsr/Makefile ++++ b/lsmsr/Makefile +@@ -40,7 +40,8 @@ + generic_msr.h + + %.h: %.regs createheader.py +- @python createheader.py $< `basename $< .regs` >$@ ++ $(PYTHON) createheader.py $< `basename $< .regs` >$@.tmp ; \ ++ mv $@.tmp $@ + + LSMSR_SRC = \ + lsmsr.c \ +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ + + CFLAGS = -DVERSION="$(VERSION)" + +-CFLAGS += -Wall -W -g -O2 -D_FORTIFY_SOURCE=2 -I. -Iinclude ++CFLAGS += -Wall -W -I. -Iinclude + ifneq ($(SYSROOT),) + CFLAGS += --sysroot=$(SYSROOT) + endif +@@ -33,14 +33,8 @@ + CPP_MAJOR := $(shell $(CPP) -dumpversion 2>&1 | cut -d'.' -f1) + CPP_MINOR := $(shell $(CPP) -dumpversion 2>&1 | cut -d'.' -f2) + DEVEL := $(shell grep VERSION Makefile | head -n1 | grep pre | wc -l) +-CFLAGS += $(shell if [ $(CPP_MAJOR) -eq 6 -a $(CPP_MINOR) -ge 3 -a $(DEVEL) -eq 1 ] ; then echo "-Werror"; else echo ""; fi) + +-LDFLAGS = -Wl,-z,relro,-z,now +-LDFLAGS += $(shell pkg-config --libs libpci) +- +-ifeq ($(CC),"") +-CC = gcc +-endif ++LIBS += $(shell pkg-config --libs libpci) + + ifdef STATIC_LIBPCI + LIBPCI = -Wl,-Bstatic -lpci -Wl,-Bdynamic -lz +@@ -68,15 +62,15 @@ + $(sort $(patsubst %.c,%.o,$(wildcard vendors/*/*.c))) + + x86info: $(X86INFO_OBJS) $(X86INFO_HEADERS) +- $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) \ +- $(LIBPCI) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) \ ++ $(LIBPCI) $(LIBS) + + DEPDIR= .deps + -include $(X86INFO_SRC:%.c=$(DEPDIR)/%.d) + df = $(DEPDIR)/$(*D)/$(*F) + + %.o : %.c +- $(QUIET_CC)$(CC) $(CFLAGS) -o $@ -c $< ++ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< + @mkdir -p $(DEPDIR)/$(*D) + @$(CC) -MM $(CFLAGS) $*.c > $(df).d + @mv -f $(df).d $(df).d.tmp |