xarthisius 14/04/24 20:46:17 Added: i3-4.7.2-cflags.patch i3-4.7.2-parallel_make.patch Log: Respect CFLAGS during linking phase, make build parallel safe. Fixes #508304 by Ferenc Erki <erkifer...@gmail.com> and #508426 by Julian Ospald <hasuf...@gentoo.org>. Thanks to hasufell for the patches (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 895192F9)
Revision Changes Path 1.1 x11-wm/i3/files/i3-4.7.2-cflags.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/i3/files/i3-4.7.2-cflags.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/i3/files/i3-4.7.2-cflags.patch?rev=1.1&content-type=text/plain Index: i3-4.7.2-cflags.patch =================================================================== Respect CFLAGS in linking command https://bugs.gentoo.org/show_bug.cgi?id=508426 Patch written by Julian Ospald <hasuf...@gentoo.org> --- a/src/i3.mk +++ b/src/i3.mk @@ -64,7 +64,7 @@ i3-config-parser.stamp: generate-command-parser.pl parser-specs/config.spec i3: libi3.a $(i3_OBJECTS) echo "[i3] Link i3" - $(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_LIBS) + $(CC) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_LIBS) install-i3: i3 echo "[i3] Install" 1.1 x11-wm/i3/files/i3-4.7.2-parallel_make.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/i3/files/i3-4.7.2-parallel_make.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/i3/files/i3-4.7.2-parallel_make.patch?rev=1.1&content-type=text/plain Index: i3-4.7.2-parallel_make.patch =================================================================== Fix parallel build https://bugs.gentoo.org/show_bug.cgi?id=508304 Patch written by Julian Ospald <hasuf...@gentoo.org> --- a/src/i3.mk +++ b/src/i3.mk @@ -1,4 +1,4 @@ -ALL_TARGETS += i3 +ALL_TARGETS += i3 test-tools INSTALL_TARGETS += install-i3 CLEAN_TARGETS += clean-i3 @@ -36,20 +36,22 @@ src/%.o: src/%.c $(i3_HEADERS_DEP) echo "[i3] CC $<" $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$< -# This target compiles the command parser twice: -# Once with -DTEST_PARSER, creating a stand-alone executable used for tests, -# and once as an object file for i3. +test-tools: src/test.commands_parser src/test.config_parser + +src/test.commands_parser: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp libi3.a + echo "[i3] Link test.commands_parser" + $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.commands_parser $< $(LIBS) $(i3_LIBS) + +src/test.config_parser: src/config_parser.c $(i3_HEADERS_DEP) i3-config-parser.stamp libi3.a + echo "[i3] Link test.config_parser" + $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.config_parser $< $(LIBS) $(i3_LIBS) + src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp echo "[i3] CC $<" - $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.commands_parser $< $(LIBS) $(i3_LIBS) $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$< -# This target compiles the command parser twice: -# Once with -DTEST_PARSER, creating a stand-alone executable used for tests, -# and once as an object file for i3. src/config_parser.o: src/config_parser.c $(i3_HEADERS_DEP) i3-config-parser.stamp echo "[i3] CC $<" - $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.config_parser $< $(LIBS) $(i3_LIBS) $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$< i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec