Hi, On Thu, Apr 24, 2025 at 12:11:41PM +0200, Vladimir Marek wrote: > Hi, > > This is about commit > https://git.savannah.gnu.org/cgit/config.git/commit/config.guess?id=9e4c79f5fc4ef734b2f3115ab9184b70789e21a3 > which introduced the -m64 option to Solaris i86pc compiler detection > code. > > @@ -437,7 +437,7 @@ case > $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in > # This test works for both compilers. > if test "$CC_FOR_BUILD" != no_compiler_found; then > if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ > - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ > + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ > grep IS_64BIT_ARCH >/dev/null > then > SUN_ARCH=x86_64 > > I am updating autotools on Solaris and one of the issues I have met is > that that libtheora 32bit build is now failing. Reason is that before > the change mentioned above it used > > $ CC='gcc -m32' libtheora-1.2.0/config.guess > i386-pc-solaris2.11 > > With the change (because -m64 is after $CC_FOR_BUILD) we have > > $ CC='gcc -m32' ./config.guess > x86_64-pc-solaris2.11 > > What architecture should config.guess return? It would make sense to me > to have it return the architecture of the binaries the compiler will > produce. > > > For sparc the config.guess behaves differently to what I would suppose > too. > > $ CC='gcc -m32' ./config.guess > sparc-sun-solaris2.11 > > $ CC='gcc -m64' ./config.guess > sparc-sun-solaris2.11 > > I would suppose to see 'sparc64-...' in 64bit build. I can see > workaround for that in Firefox shipped in Solaris (that workaround > forces it to be 64bit, which works fine as we do not build 32bit > firefox). > https://github.com/oracle/solaris-userland/blob/master/components/desktop/firefox/patches/Bug1391072.patch > > And similarly in mozjs > https://github.com/oracle/solaris-userland/blob/master/components/desktop/mozjs-78/patches/02-sparc.patch > > And also ruby (although it returns "amd64-..." which I'm not sure is > correct. > https://github.com/oracle/solaris-userland/blob/master/components/ruby/ruby-33/patches/02-config.patch > > > I'm happy to create a patch and test it if my theory is correct. But > maybe I am wrong and do not understand what exactly config.guess is > supposed to exactly do. In which case I'm happy to learn :)
Sure, please submit a patch. -- ldv