Project

General

Profile

Bug #7981

illumos ld not working with thin static libraries

Added by Igor Kozhukhov about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Start date:
2017-03-19
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

steps for good static library:

gcc -c -o mytext.o mytext.c
ar cr my.a mytext.o
ranlib my.a
gcc -o t t.c my.a
./t
mytest: hello!

steps with issue:

ar crT my.a mytext.o
ranlib my.a

gcc -o t t.c my.a
ld: fatal: file my.a: unknown file type
ld: fatal: file processing errors. No output written to t
collect2: error: ld returned 1 exit status

man GNU ar:

       T   Make the specified archive a thin archive.  If it already exists and is a regular
           archive, the existing members must be present in the same directory as archive.

i have found this issue with build webkit2gtk-2.14.3
GNU ld works fine with thin static library


Files

mytext.c (80 Bytes) mytext.c Igor Kozhukhov, 2017-03-19 02:18 AM
t.c (68 Bytes) t.c Igor Kozhukhov, 2017-03-19 02:18 AM

Also available in: Atom PDF