Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL 1.0.2 'make clean' doesn't clean generated .S files #2220

Closed
JonathanLennox opened this issue Jan 12, 2017 · 2 comments
Closed

OpenSSL 1.0.2 'make clean' doesn't clean generated .S files #2220

JonathanLennox opened this issue Jan 12, 2017 · 2 comments

Comments

@JonathanLennox
Copy link

When building for both the linux-armv4 and linux-aarch64 targets, OpenSSL 1.0.2j's make process generates .S files for ARM assembly, in the crypto/aes, crypto/bn, crypto/modes, and crypto/sha directories.

Unfortunately, 'make clean' does not remove these files, and re-running Configure or 'make depend' does not do anything to let make know they need to be regenerated.

The syntax of the generated files is different for 32-bit and 64-bit arm.

Thus, if you try to build OpenSSL for both a 32-bit arm and 64-bit arm platform in the same OpenSSL directory, the second build will fail.

The solution is to add *.S to the 'clean' target in those directories.

@bernd-edlinger
Copy link
Member

I can reproduce this.
A grep reveals that also crypto/md5, crypto/rc4 and crypto/des may contain *.S files:

grep -r "\.S:" crypto
crypto/modes/Makefile:ghashv8-armx.S:	asm/ghashv8-armx.pl
crypto/modes/Makefile:ghash-%.S:	asm/ghash-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
crypto/md5/Makefile:md5-sparcv9.S:	asm/md5-sparcv9.pl
crypto/rc4/Makefile:rc4-ia64.S: asm/rc4-ia64.pl
crypto/sha/Makefile:sha256-armv4.S: asm/sha256-armv4.pl
crypto/sha/Makefile:sha1-sparcv9.S:	asm/sha1-sparcv9.pl;	$(PERL) asm/sha1-sparcv9.pl $@ $(CFLAGS)
crypto/sha/Makefile:sha256-sparcv9.S:asm/sha512-sparcv9.pl;	$(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
crypto/sha/Makefile:sha512-sparcv9.S:asm/sha512-sparcv9.pl;	$(PERL) asm/sha512-sparcv9.pl $@ $(CFLAGS)
crypto/sha/Makefile:sha1-mips.S:	asm/sha1-mips.pl;	$(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@
crypto/sha/Makefile:sha256-mips.S:	asm/sha512-mips.pl;	$(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
crypto/sha/Makefile:sha512-mips.S:	asm/sha512-mips.pl;	$(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
crypto/sha/Makefile:sha1-%.S:	asm/sha1-%.pl;		$(PERL) $< $(PERLASM_SCHEME) $@
crypto/sha/Makefile:sha256-%.S:	asm/sha512-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
crypto/sha/Makefile:sha512-%.S:	asm/sha512-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
crypto/des/Makefile:des_enc-sparc.S:	asm/des_enc.m4
crypto/aes/Makefile:aes-mips.S:	asm/aes-mips.pl
crypto/aes/Makefile:aesv8-armx.S:	asm/aesv8-armx.pl
crypto/aes/Makefile:aes-%.S:	asm/aes-%.pl;	$(PERL) $< $(PERLASM_SCHEME) > $@
crypto/aes/Makefile:bsaes-%.S:	asm/bsaes-%.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
crypto/bn/Makefile:sparct4-mont.S:	asm/sparct4-mont.pl
crypto/bn/Makefile:sparcv9-gf2m.S:	asm/sparcv9-gf2m.pl
crypto/bn/Makefile:%-mont.S:	asm/%-mont.pl;	$(PERL) $< $(PERLASM_SCHEME) $@
crypto/bn/Makefile:%-gf2m.S:	asm/%-gf2m.pl;	$(PERL) $< $(PERLASM_SCHEME) $@

bernd-edlinger added a commit to bernd-edlinger/openssl that referenced this issue Feb 16, 2017
levitte pushed a commit that referenced this issue Feb 16, 2017
Fixes #2220

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #2645)
@richsalz
Copy link
Contributor

fixed with 9b90ce0. thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants