Opened 5 years ago

Closed 5 years ago

#318 closed defect (wontfix)

-static problem

Reported by: komh 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 komh 5 years ago.
patch for -static-o problem
static-undefined.diff (3.5 KB) - added by komh 5 years ago.
patch for undefined symbols problem of -static

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by komh

patch for -static-o problem

Changed 5 years ago by komh

patch for undefined symbols problem of -static

comment:1 Changed 5 years ago by bird

  • Resolution set to wontfix
  • Status changed from new to closed

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.