Name clashes - was: Re: [RFR]: 8186723: Add SuperH as new architecture for linux
David Holmes
david.holmes at oracle.com
Thu Aug 24 13:20:49 UTC 2017
On 24/08/2017 11:10 PM, John Paul Adrian Glaubitz wrote:
> On 08/24/2017 03:07 PM, David Holmes wrote:
>>> Ok, so let's continue here as I'm not sure whether this issue should
>>> be addressed
>>> before merging the above changeset. In my opinion, it's generally
>>> rather suboptimal
>>> approach to use any global defines without surrounding underscores.
>>> But I am currently
>>> undecided what would be the best approach to resolve this problem.
>>
>> Sorry I don't have any context here. What is the issue? And is it a
>> hotspot issue or a build issue?
>
> The problem is that autoconf passes the content of VAR_CPU to CFLAGS which
> means that - on alpha and sh - CFLAGS contain "-Dalpha" and "-Dsh"
> respectively
> which results in a naming collision with some source files:
Ouch! So I have to wonder whether the raw -D for the cpu arch name is
really necessary. There's obviously a lot of legacy usage to consider
here though. But I've often assumed/expected that if we tell the
compiler to build for a specific cpu then the compiler would provide a
suitable define (probably underscored) that we could then use in the
code if needed.
Short-term solution would be your option (b) and rename alpha and sh to
something unlikely to cause a clash.
David
> === Output from failing command(s) repeated here ===
> /usr/bin/printf "* For target
> support_native_java.desktop_libmlib_image_mlib_ImageAffine.o:\n"
> * For target support_native_java.desktop_libmlib_image_mlib_ImageAffine.o:
> (/bin/grep -v -e "^Note: including file:" <
> /<<PKGBUILDDIR>>/build/make-support/failure-logs/support_native_java.desktop_libmlib_image_mlib_ImageAffine.o.log
> || true) | /usr/bin/head -n 12
> <command-line>:0:7: error: expected ';', ',' or ')' before numeric constant
> /<<PKGBUILDDIR>>/src/jdk/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h:152:50:
> note: in expansion of macro 'alpha'
> const mlib_image *alpha);
> ^~~~~
> <command-line>:0:7: error: expected ';', ',' or ')' before numeric constant
> /<<PKGBUILDDIR>>/src/jdk/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h:161:58:
> note: in expansion of macro 'alpha'
> const mlib_image *alpha);
> ^~~~~
> <command-line>:0:7: error: expected ';', ',' or ')' before numeric constant
> /<<PKGBUILDDIR>>/src/jdk/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h:170:55:
> note: in expansion of macro 'alpha'
> const mlib_image *alpha);
> ^~~~~
> if test `/usr/bin/wc -l <
> /<<PKGBUILDDIR>>/build/make-support/failure-logs/support_native_java.desktop_libmlib_image_mlib_ImageAffine.o.log`
> -gt 12; then /bin/echo " ... (rest of output omitted)" ; fi
> ... (rest of output omitted)
> /usr/bin/printf "\n* All command lines available in
> /<<PKGBUILDDIR>>/build/make-support/failure-logs.\n"
>
> * All command lines available in
> /<<PKGBUILDDIR>>/build/make-support/failure-logs.
> /usr/bin/printf "=== End of repeated output ===\n"
> === End of repeated output ===
>
More information about the hotspot-dev
mailing list