From: Ian Jackson Subject: Re: [PATCH] correct order of linker options to avoid link errors with recent toolchains Date: Fri, 23 Jul 2010 17:44:33 +0100 Message-ID: <19529.50929.327564.314930@mariner.uk.xensource.com> References: <20100723121154.GA3540@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100723121154.GA3540@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Olaf Hering Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Olaf Hering writes ("[Xen-devel] [PATCH] correct order of linker options to avoid link errors with recent toolchains"): > The order of objects and linked libraries is important with recent toolchain > when --as-needed is used. Move LDFLAGS to the end of cc commandline options. > Without this change, symbols in libbzip2 are not found when building with openSuSE 11.2 and newer. Thanks, but: I infer that libbzip2 is in LDFLAGS (as -lbzip2, I guess). Is that right ? But I think that libraries should be in *_LIBS, not LDFLAGS. LDFLAGS needs to stay at the beginning so that it can work if you set it to -static or something. > libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l) What is this program "zlib-options" ? I don't have it on my system. Ian.