Opened 10 years ago

Closed 10 years ago

#318 closed defect (wontfix)

-static problem

Reported by: KO Myung-Hun Owned by:
Priority: normal Milestone: libc-0.7
Component: gcc Version: 0.6.5
Severity: normal Keywords:
Cc:

Description

Hi/2.

If it is specified without -o option, ld fails due to -static-o.

F:\lang\work\test>gcc -static test.c
ld.exe: unrecognized option `-static-o'

If it is specified with -o option, ld fails due to undefined symbols.

F:\lang\work\test>gcc -static -o test.exe test.c
F:/lang/gcc/usr/lib/libc_s.a(signals.o): Undefined symbol ___libc_back_signalOS2
V1Handler16bit referenced from text segment
F:/lang/gcc/usr/lib/libc_s.a(signals.o): Undefined symbol ___libc_back_signalOS2
V1Handler16bit referenced from text segment

Attachments (2)

static-o.diff (785 bytes ) - added by KO Myung-Hun 10 years ago.
patch for -static-o problem
static-undefined.diff (3.5 KB ) - added by KO Myung-Hun 10 years ago.
patch for undefined symbols problem of -static

Download all attachments as: .zip

Change History (3)

by KO Myung-Hun, 10 years ago

Attachment: static-o.diff added

patch for -static-o problem

by KO Myung-Hun, 10 years ago

Attachment: static-undefined.diff added

patch for undefined symbols problem of -static

comment:1 by bird, 10 years ago

Resolution: wontfix
Status: newclosed

Static linking against kLibC is not supported and broken on purpose. That said, I've added the missing space to LINK_SPEC as it wasn't my intention to confuse the linker, just the users. r3928.

Note: See TracTickets for help on using tickets.