This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: FW: checking whether <arm-none-eabi-gcc accepts> -g... <no>


Hello again,

 I have tried to print-debug the configure script and came to the following conclusions.

Here is a simplified pseudo code like version of the ac_fn_c_try_compile() subroutine to help understand the problem:

	evaluate_compilation_command # various trials to exercise the compiler with -g option
	ac_status=$? # save result of compilation test
	
	if { test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then :
		ac_retval=0
	else
		ac_retval=1
	fi

The results of the various conditionals are as follow:

	$ac_objext: ""   # nothing, empty!
	test -z ac_c_werror_flag: false
	test ac_status = 0: true
	test ! -s conftest.err: true
	test -s conftest.: false

This is the actual compilation command passed to ac_fn_c_try_compile():

	$ac_compile: "$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5"

Where $ac_ext expands to "c" without the quotes. The compilation command does not define the name of the output file so it defaults to the source file name with the .o extension. The < test -s conftest.$ac_objext > conditional in the other hand tries to guess the extension and fails as $ac_objext is an empty string so the actual test is <test -s conftest.> which of course does not exist. Due to the formulation of the if condition the last test condition checking for the object file must pass, but it will always fail as $ac_objext is not set up correctly.

I tried to figure out how $ac_objext is being initialized, and I found three possible value assignments to the variable in the newlib configure script, but actually non of them are called...:

ac_objext=$OBJEXT
test -z "$ac_objext" && ac_objext=o
ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'


It seems that . ${newlib_basedir}/configure.host defining oext=o is also not interpreted before the problematic test case would be executed...


Any ideas why could this be happening?


Mit freundlichen Grüßen / Best regards 

Tamas Kleiber

_


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]