From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Tue, 18 Sep 2018 11:26:57 +0200 Subject: [Buildroot] [PATCH] libaio: Fix library creation for ARC with -Os In-Reply-To: References: <20180917204329.15787-1-abrodkin@synopsys.com> <20180918093604.0b421d5c@windsurf> <20180918111506.0648d78c@windsurf> Message-ID: <20180918112657.7d1b9d28@windsurf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello, On Tue, 18 Sep 2018 09:17:20 +0000, Alexey Brodkin wrote: > > Thank you, I do understand that passing LDFLAGS=-lgcc will add -lgcc to > > the link command line :-) > > > > The question is: why does libaio needs to be told explicitly to link > > against libgcc, and not any other package. > > > > And I believe the reason is because -nostdlib -nostartfiles are used. > > Why is libaio using those flags? Is there a good reason ? > > I tried removing those 2 as the first thing but it made no difference > until I added "-lgcc" explicitly. Then there is another toolchain bug, because linking against libgcc should be done automatically as soon as a libgcc feature gets used by the thing being compiled/linked. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com