/[gentoo-x86]/sys-apps/s390-tools/files/s390-tools-1.16.0-build.patch
Gentoo

Contents of /sys-apps/s390-tools/files/s390-tools-1.16.0-build.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Apr 30 02:20:01 2012 UTC (2 years, 6 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Version bump.

(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)

1 - fix errors in subdir makes
2 - parallelize subdir runs
3 - cleanup flag handling
4
5 --- a/Makefile
6 +++ b/Makefile
7 @@ -9,19 +9,19 @@
8 vmconvert vmcp man mon_tools dasdinfo vmur cpuplugd ipl_tools \
9 ziomon iucvterm hyptop cmsfs-fuse
10
11 -all: subdirs_make
12 +SUB_DIRS_ALL = $(patsubst %,subdirs_all_%,$(SUB_DIRS))
13 +SUB_DIRS_CLEAN = $(patsubst %,subdirs_clean_%,$(SUB_DIRS))
14 +SUB_DIRS_INSTALL = $(patsubst %,subdirs_install_%,$(SUB_DIRS))
15
16 -subdirs_make:
17 - set -e ; for dir in $(SUB_DIRS) ; do \
18 - cd $$dir ; $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH); cd ..; \
19 - done
20 +all: $(SUB_DIRS_ALL)
21
22 -clean:
23 - set -e ; for dir in $(SUB_DIRS) ; do \
24 - cd $$dir ; $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH) clean; cd ..; \
25 - done
26 +_subdir = $(patsubst subdirs_%,%,$@)
27 +subdir = $(shell expr $(_subdir) : '[^_]*_\(.*\)')
28 +subtarget = $(shell expr $(_subdir) : '\([^_]*\)_.*')
29 +subdirs_%:
30 + $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH) -C $(subdir) $(subtarget)
31 +
32 +clean: $(SUB_DIRS_CLEAN)
33
34 install:
35 - set -e ; for dir in $(SUB_DIRS) ; do \
36 - cd $$dir ; $(MAKE) TOPDIR=$(TOPDIR) ARCH=$(ARCH) install; cd ..; \
37 - done
38 + $(MAKE) $(SUB_DIRS_INSTALL)
39 --- a/common.mak
40 +++ b/common.mak
41 @@ -17,10 +17,10 @@
42 # Cross Compiling Support
43 CROSS_COMPILE =
44 AS = $(call echocmd," AS ",/$@)$(CROSS_COMPILE)as
45 -LINK = $(call echocmd," LINK ",/$@)$(CROSS_COMPILE)gcc
46 +LINK = $(call echocmd," LINK ",/$@)$(CROSS_COMPILE)gcc $(CFLAGS) $(LDFLAGS)
47 LD = $(call echocmd," LD ",/$@)$(CROSS_COMPILE)ld
48 CC = $(call echocmd," CC ",/$@)$(CROSS_COMPILE)gcc
49 -LINKXX = $(call echocmd," LINKXX ",/$@)$(CROSS_COMPILE)g++
50 +LINKXX = $(call echocmd," LINKXX ",/$@)$(CROSS_COMPILE)g++ $(CXXFLAGS) $(LDFLAGS)
51 CXX = $(call echocmd," CXX ",/$@)$(CROSS_COMPILE)g++
52 CPP = $(call echocmd," CPP ",/$@)$(CROSS_COMPILE)gcc -E
53 AR = $(call echocmd," AR ",/$@)$(CROSS_COMPILE)ar
54 @@ -41,14 +41,13 @@
55 ZFCPDUMP_RD = zfcpdump.rd
56 export ZFCPDUMP_DIR ZFCPDUMP_IMAGE ZFCPDUMP_RD
57
58 -CFLAGS = $(WARNFLAGS) -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
59 - -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
60 - -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR) \
61 - -g $(OPT_FLAGS)
62 -CXXFLAGS = $(WARNFLAGS) -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
63 - -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
64 - -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR) \
65 - -g $(OPT_FLAGS)
66 +CFLAGS += $(WARNFLAGS) $(OPT_FLAGS)
67 +CXXFLAGS += $(WARNFLAGS) $(OPT_FLAGS)
68 +CPPFLAGS += \
69 + -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
70 + -DS390_TOOLS_LIBDIR=$(TOOLS_LIBDIR) \
71 + -DS390_TOOLS_SYSCONFDIR=$(SYSCONFDIR)
72 +export CPPFLAGS
73
74 # make G=1
75 # Compile tools so that gcov can be used to collect code coverage data.
76 @@ -76,7 +75,7 @@
77 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
78
79 %: %.o
80 - $(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
81 + $(LINK) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
82
83 all:
84
85 --- a/zfcpdump/ramdisk/Makefile
86 +++ b/zfcpdump/ramdisk/Makefile
87 @@ -12,16 +12,14 @@
88
89 all: $(ZFCPDUMP_RD)
90
91 -CFLAGS += -D_FILE_OFFSET_BITS=64
92 +CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I../../include
93 +LDFLAGS += -static
94 +LDLIBS += -lz
95
96 $(ZFCPDUMP_RD): zfcp_dumper
97 /bin/sh ./create_rd.sh $(ARCH)
98
99 -zfcp_dumper: zfcp_dumper.o
100 - $(CC) -o zfcp_dumper -static zfcp_dumper.o -lz
101 -
102 zfcp_dumper.o: zfcp_dumper.c zfcp_dumper.h
103 - $(CC) $(CFLAGS) -c -I../../include zfcp_dumper.c
104
105 install: $(ZFCPDUMP_RD)
106 /bin/sh ./create_rd.sh -i
107 @@ -29,6 +27,3 @@
108 clean clobber:
109 /bin/sh ./create_rd.sh -r
110 rm -f *.o
111 -
112 -%.o: %.c
113 - $(CC) $(CFLAGS) -c -o $@ $<
114 --- a/zfcpdump_v2/Makefile
115 +++ b/zfcpdump_v2/Makefile
116 @@ -6,12 +6,13 @@
117 LINUX_DIR := linux-$(LINUX_VERSION)
118 E2FSPROGS := e2fsprogs-1.41.3
119
120 -CFLAGS += -D_FILE_OFFSET_BITS=64
121 +CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DGZIP_SUPPORT
122 +LDFLAGS += -static
123 +LDLIBS += -lz
124
125 all: zfcpdump.image
126
127 zfcpdump: zfcpdump.c zfcpdump.h
128 - $(CC) $(CFLAGS) -D GZIP_SUPPORT -static -o $@ zfcpdump.c -lz
129
130 e2fsck:
131 tar xfzv $(E2FSPROGS).tar.gz
132 --- a/zipl/boot/Makefile
133 +++ b/zipl/boot/Makefile
134 @@ -3,9 +3,8 @@
135
136 S390_TOOLS_VERSION_EBCDIC := $(shell echo -n $(S390_TOOLS_RELEASE) | dd conv=ebcdic 2> /dev/null | hexdump -v -e '/1 "0x%02x,"' | sed 's/.$$//')
137
138 -CFLAGS += -I../include -D__ASSEMBLY__ \
139 +CPPFLAGS += -I../include -D__ASSEMBLY__ \
140 -DS390_TOOLS_VERSION_EBCDIC=$(S390_TOOLS_VERSION_EBCDIC)
141 -LDFLAGS = -O2
142 FILES := fba0.bin fba2.bin eckd0.bin eckd1a.bin eckd1b.bin eckd2.bin \
143 eckd2dump.bin tapedump.bin stage3.bin tape0.bin fba2dump.bin \
144 eckd2mvdump.bin
145 @@ -16,7 +15,7 @@
146 %: %.S
147
148 %.o: %.S
149 - $(CC) $(CFLAGS) -c -o $@ $<
150 + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
151
152 %.exec: %.o
153 @STAGE=$$( \

  ViewVC Help
Powered by ViewVC 1.1.20