On Tue 16 Sep 2014 08:15:37 Andy Polyakov via RT wrote: > >>> This reverts commit d1cf23ac86c05b22b8780e2c03b67230564d2d34. > >>> > >>> When gcc is given a .s file and told to preprocess it, it outputs > >>> nothing. > >>> Since gcc targets are more common/important than OSF, revert it and let > >>> the original submitter sort out the problem. > >>> > >>> URL: https://bugs.gentoo.org/499086 > >>> --- > >>> > >>> alphacpuid.s: alphacpuid.pl > >>> > >>> - (preproc=/tmp/$$$$.$@; trap "rm $$preproc" INT; \ > >>> - $(PERL) alphacpuid.pl > $$preproc && \ > >>> - $(CC) -E $$preproc > $@ && rm $$preproc) > >>> + $(PERL) $< | $(CC) -E - | tee $@ > /dev/null > >> > >> Can you confirm that preproc=/tmp/$$$$.$@.S in original snippet solves > >> the problem? > > > > i don't understand what you mean. the code as written in the tree does > > not > > work with gcc. preproc will expand into /tmp/<pid>.alphacpuid.s, and > > since > > gcc will skip .s files with -E, you get no output. > > But if you name the file /tmp/<pid>.alphacpuid.s.S, then it should work. > Because gcc driver looks at last extension, right?
sorry, missed the ".S" suffix in all the noise :) > > i'd also highlight that relying on the pid # to give you a global unique > > tmp file is very very broken. it's easy for malicious people to clobber, > > and it's not even unique on modern Linux systems with pid namespaces. it > > should really just write it to $@.tmp instead and then do `mv $@ $@.tmp`. > > OK, preproc=$@.S then. Can you confirm that it works? that seems to work -mike
signature.asc
Description: This is a digitally signed message part.