]> git.ipfire.org Git - thirdparty/openssl.git/commit
Build: Fix circular object deps with old GCC
authorOrgad Shaneh <orgads@gmail.com>
Thu, 12 Sep 2024 20:23:46 +0000 (23:23 +0300)
committerRichard Levitte <levitte@openssl.org>
Tue, 17 Sep 2024 05:26:17 +0000 (07:26 +0200)
commit95c71868867edd5209ae12989ca65f05f463d4bb
tree2e70471a6328f1c2dc3f1124f723206a34cfdd0b
parentdd5fb900dedd29fe93d3ed02e0d1f0e4e2f03063
Build: Fix circular object deps with old GCC

When both -o and -MT are used, GCC 4.1 prints the object file twice in
the dependency file. e.g.:

foo.o foo.o: foo.c

If the file name is long, then the second occurrence moves to the next
line. e.g.:

ssl/statem/libssl-shlib-statem_dtls.o \
  ssl/statem/libssl-shlib-statem_dtls.o: ../ssl/statem/statem_dtls.c \

add-depends script scans one line at a time, so when the first line is
processed, the object file becomes a dependency itself.

Fix by removing -MT altogether.

This also fixes makedepend for nonstop platform.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25455)

(cherry picked from commit 6288aa440c1ba111eaf52cf79659a25329205022)
Configurations/unix-Makefile.tmpl
NOTES-NONSTOP.md