You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/bglibs/files/bglibs-1.106-parallel-fix.p...

62 lines
2.1 KiB

Forward port to 1.106 by Thilo Bangert <bangert@gentoo.org>
Fixes for parallel compile.
- Redirection straight to an output target that is later used for dependancies
is not safe. The output file must be come into existence atomically.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff -Naur bglibs-1.106.orig/Makefile bglibs-1.106/Makefile
--- bglibs-1.106.orig/Makefile 2009-11-20 11:52:29.000000000 +0100
+++ bglibs-1.106/Makefile 2009-11-20 11:56:01.000000000 +0100
@@ -152,37 +152,43 @@
./compile crc-gentab.c
crc/crc16_arc_table.c: crc-gentab
- ./crc-gentab crc16_arc 16 0x8005 reflected >$@
+ ./crc-gentab crc16_arc 16 0x8005 reflected >$@.tmp
+ mv $@.tmp $@
crc/crc16_arc_table.lo crc/crc16_arc_table.o: ltcompile crc/crc16_arc_table.c
./ltcompile crc/crc16_arc_table.c
crc/crc16_ccitt_table.c: crc-gentab
- ./crc-gentab crc16_ccitt 16 0x1021 normal >$@
+ ./crc-gentab crc16_ccitt 16 0x1021 normal >$@.tmp
+ mv $@.tmp $@
crc/crc16_ccitt_table.lo crc/crc16_ccitt_table.o: ltcompile crc/crc16_ccitt_table.c
./ltcompile crc/crc16_ccitt_table.c
crc/crc16_xmodem_table.c: crc-gentab
- ./crc-gentab crc16_xmodem 16 0x8408 reflected >$@
+ ./crc-gentab crc16_xmodem 16 0x8408 reflected >$@.tmp
+ mv $@.tmp $@
crc/crc16_xmodem_table.lo crc/crc16_xmodem_table.o: ltcompile crc/crc16_xmodem_table.c
./ltcompile crc/crc16_xmodem_table.c
crc/crc32_table.c: crc-gentab
- ./crc-gentab crc32 32 0x04C11DB7 reflected >$@
+ ./crc-gentab crc32 32 0x04C11DB7 reflected >$@.tmp
+ mv $@.tmp $@
crc/crc32_table.lo crc/crc32_table.o: ltcompile crc/crc32_table.c
./ltcompile crc/crc32_table.c
crc/crc32c_table.c: crc-gentab
- ./crc-gentab crc32c 32 0x1EDC6F41 reflected >$@
+ ./crc-gentab crc32c 32 0x1EDC6F41 reflected >$@.tmp
+ mv $@.tmp $@
crc/crc32c_table.lo crc/crc32c_table.o: ltcompile crc/crc32c_table.c
./ltcompile crc/crc32c_table.c
crc/crc64_table.c: crc-gentab
- ./crc-gentab crc64 64 0x42F0E1EBA9EA3693 normal >$@
+ ./crc-gentab crc64 64 0x42F0E1EBA9EA3693 normal >$@.tmp
+ mv $@.tmp $@
crc/crc64_table.lo crc/crc64_table.o: ltcompile crc/crc64_table.c
./ltcompile crc/crc64_table.c