Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Jun 2009 16:40:14 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        ports@freebsd.org, Peter Jeremy <peterjeremy@optushome.com.au>
Subject:   Re: porting: Linux to Freebsd
Message-ID:  <20090608164014.131052xgwiww9bks@webmail.leidinger.net>
In-Reply-To: <18989.6105.484074.889552@jerusalem.litteratus.org>
References:  <18988.39724.572280.687111@jerusalem.litteratus.org> <20090608082930.GD9529@server.vk2pj.dyndns.org> <18988.65260.635443.439491@jerusalem.litteratus.org> <20090608143519.1866665ogux2b8g0@webmail.leidinger.net> <18989.6105.484074.889552@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Robert Huff <roberthuff@rcn.com> (from Mon, 8 Jun 2009  
09:53:29 -0400):

>
> Alexander Leidinger writes:
>
>>  > 	First problem:
>>
>>  Looks like bash-isms in configure.
>
> 	for (i = 0; i < 10; i++) hit_forehead_with_desk();
>
> 	I had already figured out replacing "make" with "gmake"; this
> should have been obvious.
>
>>
>>  > 	When following the instructions here
>>  > "http://ctp2.darkdust.net/anonsvn/branches/linux/doc/README.linux" I
>>  > get to step 2 ("configure") and get this:
>>  >
>>  > test: x/usr/bin/byacc: unexpected operator
>>
>>  Some possibilities:
>>    - In the test for byacc they maybe forgot quotes to protect an  
>> empty value.
>>    - wrong operator used in test
>>    - unknown bashism
>
> 	Right: I re-ran under bash, and got the same problems.
> 	Looking at configure.ac, I see:
>
> AC_PATH_PROG(YACC,byacc,no)
> if test "x$YACC" == "xno"

This should be a "=", not a "==".

>>  Looks like bashism. Someone tries to substitute something in CFLAGS,
>>  but this kind of advanced substitution is not supported in a posix
>>  compliant sh. You can test this assumption by installing bash and
>>  runnging "bash ./configure" instead. If it is true, you need to fix
>>  configure.in or configure.ac.
>
> 	Relevant bit is:
>
> for ac_remove_CFLAG in "-O1" "-O2" "-O3" ; do
> 	CFLAGS=${CFLAGS//${ac_remove_CFLAG}/}
> 	CPPFLAGS=${CPPFLAGS//${ac_remove_CFLAG}/}
> 	CXXFLAGS=${CXXFLAGS//${ac_remove_CFLAG}/}
> done

Quick try:
CFLAGS=`echo $CFLAGS | sed -e 's:-O[123]::g'`

Bye,
Alexander.

-- 
MANAGER:
	A man known for giving great meeting.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090608164014.131052xgwiww9bks>