Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 432398

Summary: sys-fs/aufs3-3_p20120813: LDFLAGS passed to linker while building kernel module
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: [OLD] Core systemAssignee: Justin Lecher (RETIRED) <jlec>
Status: RESOLVED FIXED    
Severity: normal CC: tommy
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 432392    
Attachments: set raw LDFLAGS
build.log
build.log (MAKEOPTS='V=1')

Description Dennis Schridde 2012-08-23 09:58:19 UTC
Same as bug #340107, just for sys-fs/aufs3-3_p20120813 instead. Patch attached.

Reproducible: Always
Comment 1 Dennis Schridde 2012-08-23 09:58:45 UTC
Created attachment 322010 [details, diff]
set raw LDFLAGS
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2012-08-24 01:04:08 UTC
i never had problems with that. Waht is wrong here?
Comment 3 Dennis Schridde 2012-08-24 08:31:39 UTC
Created attachment 322082 [details]
build.log
Comment 4 Dennis Schridde 2012-08-24 08:34:46 UTC
It appears that the kernel buildsystem calls ld directly, instead of via GCC:
/usr/src/linux-3.5.2-gentoo/Makefile: LD              = $(CROSS_COMPILE)ld
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2012-08-26 09:38:59 UTC
Here it doesn't call ld directly. Please attach the build.log with MAKEOPTS="V=1"
Comment 6 Dennis Schridde 2012-08-27 11:09:45 UTC
Created attachment 322350 [details]
build.log (MAKEOPTS='V=1')
Comment 7 Dennis Schridde 2012-08-27 11:11:52 UTC
(In reply to comment #5)
> Here it doesn't call ld directly. Please attach the build.log with
> MAKEOPTS="V=1"
Could you please grep ^LD /usr/src/linux/Makefile? I'd be interested what it calls on your side.
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2012-08-27 11:16:51 UTC
# grep ^LD /usr/src/linux/Makefile
LD		= $(CROSS_COMPILE)ld
LDFLAGS_MODULE  =
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
LDFLAGS_vmlinux	+= $(call ld-option, -X,)
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2012-08-27 11:19:19 UTC
Oh I was wrong. ld gets called but without LDFLAGS.
Comment 10 Dennis Schridde 2012-09-13 12:46:35 UTC
Were you able to reproduce this?
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2012-09-13 14:16:56 UTC
Not yet. I will fix all the current bugs with the next bump for linux-3.5. I will have no real time for this until 2. week of october.
Comment 12 Justin Lecher (RETIRED) gentoo-dev 2012-10-07 11:49:17 UTC
+  07 Oct 2012; Justin Lecher <jlec@gentoo.org> aufs3-3_p20120813.ebuild:
+  Pass raw ldflags if ld is called directly, #432398; use KV_OUT_DIR instead of
+  KV_DIR, #432346 thanks Dennis Schride for the patches
+
Comment 13 Dennis Schridde 2012-10-17 19:19:40 UTC
(In reply to comment #12)
> +  07 Oct 2012; Justin Lecher <jlec@gentoo.org> aufs3-3_p20120813.ebuild:
> +  Pass raw ldflags if ld is called directly, #432398; use KV_OUT_DIR
> instead of
> +  KV_DIR, #432346 thanks Dennis Schride for the patches
> +
Was this dropped again? It seems LDFLAGS was dropped from the emake commandline again, and flag-o-matic is no longer inherited.
Comment 14 Dennis Schridde 2012-10-17 19:39:07 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > +  07 Oct 2012; Justin Lecher <jlec@gentoo.org> aufs3-3_p20120813.ebuild:
> > +  Pass raw ldflags if ld is called directly, #432398; use KV_OUT_DIR
> > instead of
> > +  KV_DIR, #432346 thanks Dennis Schride for the patches
> > +
> Was this dropped again? It seems LDFLAGS was dropped from the emake
> commandline again, and flag-o-matic is no longer inherited.

aufs3-3_p20121015 abd aufs3-3_p20120813-r1 are affected.
Comment 15 Justin Lecher (RETIRED) gentoo-dev 2012-10-18 17:26:13 UTC
+  18 Oct 2012; Justin Lecher <jlec@gentoo.org> aufs3-3_p20120813-r1.ebuild,
+  aufs3-3_p20121015.ebuild:
+  Merge changes related bugs 432346 432392 432398 into newest version
+