This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rebaseall [1.7]: cyggcc_s-1.dll error


On 06/29/2010 04:23 PM, Larry Hall (Cygwin) wrote:
>>>> Or dash could be rebuilt using -static-libgcc.
>>>
>>> OK, I'm now trying to figure out how to add -static-libgcc into my
>>> cygport file.  Look for an updated dash later today...
>>
>> In the meantime, you might want to consider linking dash with
>> -static-libgcc.
> 
> You know, I thought of that too but then I thought, it's probably better
> that
> dash is statically linked with libgcc instead.

Or maybe I should just try changing my .cygport file to pass different
options to configure so that I do static linking.  Like adding one line:
export CFLAGS='-O2 -static-libgcc'

Interesting observations from that attempt:

CYGCONF_ARGS can't accept arguments with whitespace; I had to pass my
CFLAGS with whitespace through the environment instead.  I guess if
cygport were changed to treat CYGCONF_ARGS as an array variable instead:

./configure "$*" "${CYGCONF_ARGS[*]}"

then I could have used
 CYGCONF_ARGS=(CC=gcc-4 CFLAGS='-O2 -static-libgcc')

but that would be a change to everyone who used CYGCONF_ARGS as a flat
variable.  Is there a bash shorthand for telling whether a variable is
an array instead of flat?


And what difference does libgcc really make, anyways?

$ ll ./dash-0.5.6.1-?/inst/usr/bin/ash.exe
-rwxr-xr-x 2 eblake None 82446 2010-06-28 12:05
./dash-0.5.6.1-1/inst/usr/bin/ash.exe*
-rwxr-xr-x 2 eblake None 82446 2010-06-29 16:48
./dash-0.5.6.1-2/inst/usr/bin/ash.exe*

Identical size executables, but cygcheck confirms that only -1
dynamically sucks in cyggcc_s-1.dll.  Is that a shortcoming of the
toolchain, in defaulting to the dynamic dependence even when it makes no
difference to the final exe size?


-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]