I don't use 2.6.x at all but I need to develop a patch for it. On my first unpack,compile I noticed during it's compile that it seems to have some brain dead logic. -Wl,-Bstatic -Wl,-Bdynamic <-- this really does not make any sense to me. I'm going to try to dig up some other toolchain guru's to comment on this as it could possibly cause a whole array of problems. Reproducible: Always Steps to Reproduce: 1. ebuild module-init-tools-3.0_pre9.ebuild clean unpack compile 2. 3. Actual Results: gcc -Wunused -Wall -o insmod.static -static insmod.o gcc -Wunused -Wall -o lsmod lsmod.o -Wl,-Bstatic -lz -Wl,-Bdynamic gcc -Wunused -Wall -o insmod insmod.o -Wl,-Bstatic -lz -Wl,-Bdynamic gcc -Wunused -Wall -o modprobe modprobe.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic gcc -Wunused -Wall -o rmmod rmmod.o -Wl,-Bstatic -lz -Wl,-Bdynamic gcc -Wunused -Wall -o depmod depmod.o moduleops.o tables.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic gcc -Wunused -Wall -o modinfo modinfo.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic Expected Results: sane logic to be used.
Yeah, this is rather silly as -Bstatic and -Bdynamic knock each other out: and a library has to be either static, or dynamic: it seems to go the dynamic route as that's how the flags are parsed but who knows what GCC might do on a bad day... Secondly, the Makefile makes insmod.static elsewhere in a detached section so I don't see why -Bstatic is there...
plasmaroo, So would you say that this is really this is an upstream bug? If so then somebody should touch base. I'm not planning on doing the follow up with this cuz I'm not willing to do the testing.
rusty: take a look at this for us please ?
I do not see what the problem is: -- gcc -g -O2 -Wunused -Wall -o modinfo modinfo.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic -- means, link in zlib's static lib, but have the binary dynamic (in above case modinfo). Anything I missed?
This, in fact, is how you make one library static while the others are dynamic. In this case, it's zlib, and if you look in configure.in, you'll see this comment: # If zlib is required, libz must be linked static, modprobe is in # /sbin, libz is in /usr/lib and may not be available when it is run. If you're going to use emotionally charged phrases like "brain dead" and "expect sane logic to be used", here's some free advice: 1) Make DAMN sure you know exactly what you are talking about, 2) Make sure that the mistake is not your own, and 3) Picture the last time you thought (1) and (2) were correct and you made a complete dick of yourself when it turned out neither were true. For me, doing these three has significantly reduced the number of people who think I'm an arrogant git. Hope that helps you too, Rusty.
Rusty, Thank you for your insight. I've also checked with others and you are absolutely correct. I had not seen this type of linking done before and was fishing more for a technical explanation if that was the intended behavior. I'll also note to be a tad more carefull about the wording I use when inquiring about such things in the future. changing resolution to INVALID