tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: recent x changes, solaris compiler-options-with-spaces,



On Wed, Jun 06, 2012 at 11:17:12AM +0200, J?rn Clausen wrote:
> > Ok that means that whatever as_echo expands to either doesn't
> > work on netbsd, or never works.
> 
> I'm not sure how Solaris ended up in the subject of this thread. This
> happens on Solaris 10 using GCC 3.4.6:

The compiler options being tested for are solaris ones.

> checking if gcc -std=gnu99 supports -Wredundant-decls... yes
> checking if gcc -std=gnu99 supports -Werror=implicit... no
> checking if gcc -std=gnu99 supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN
> -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... no
> checking if gcc -std=gnu99 supports -Werror=nonnull... no
> checking if gcc -std=gnu99 supports -Werror=init-self... no
> 
> ... and with GCC 4.7.0:
> 
> checking if gcc -std=gnu99 supports -Wredundant-decls... yes
> checking if gcc -std=gnu99 supports -Werror=implicit... yes
> checking if gcc -std=gnu99 supports -Werror=nonnull... yes
> checking if gcc -std=gnu99 supports -Werror=init-self... yes
> 
> The test either succeeds (syntactically) or is not triggered at all.

That is probably down to logic in the config script.

I've dug into that crappy script some more.
I think it only actually works when it uses the 'print -r --' form.

If you run the top of that script on netbsd it sets: as_echo='printf %s\n'
This means that $as_echo foo bar generates two lines of output (because
printf runs out of format and reprocesses the format string).

If you end up using the /usr/ucb/echo version you lose all but the
first argument.

I believe that $as_echo is supposed to be given a single parameter.
This means that line 14057 of the config script is wrong on almost
all architectures, it is:
    cacheid=`$as_echo xorg_cv_cc_flag_-errwarn=E_NO_EXPLICIT_TYPE_GIVEN 
-errwarn=E_NO_IMPLICIT_DECL_ALLOWED`
which passes 2 arguments to $as_echo.

Not a NetBSD bug.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index