[Top][All Lists]

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

Re: -no-undefined vs gcc 4.6.0

From: LRN
Subject: Re: -no-undefined vs gcc 4.6.0
Date: Sat, 19 Mar 2011 00:08:02 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b13pre) Gecko/20110315 Thunderbird/3.3a4pre

On 18.03.2011 23:51, Vincent Torri wrote:

On Fri, 18 Mar 2011, LRN wrote:

Since gcc 4.6.0 it is no longer possible to use LDFLAGS=-no-undefined
gcc now says something like this:
gcc.exe: error: unrecognized option '-no-undefined'
Before 4.6.0 it was possible to do that, and gcc said only this:
gcc.exe: unrecognized option '-no-undefined'
That is, unrecognized option was not considered a show-stopper, and everything worked just fine - the option, being part of LDFLAGS, eventually reached libtool, and libtool were taking the clue to disallow undefined symbols. Not anymore. Now i have to pass LDFLAGS=-Wl,-no-undefined. Which is ok from gcc' point of view, but libtool is unable to recognize this argument in such form and simply refuses to build shared libraries outright. Not sure if it's a bug or a feature, and how to work through that without making groundbreaking changes in software packages that use libtool.

I think that you have to pass -no-undefined to the ***_LDFLAGS variable of your library:

libproject_la_LDFLAGS = -no-undefined

or, globally:

AM_LDFLAGS = -no-undefined

it has always worked for me, without gcc warning.

It's not my library. I'm compiling mpc-0.8.2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]