public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/56616] New: gnatmake builds SAL incorrectly if library_kind is "static"
@ 2013-03-14 12:25 simon at pushface dot org
2013-03-14 12:30 ` [Bug ada/56616] " simon at pushface dot org
0 siblings, 1 reply; 2+ messages in thread
From: simon at pushface dot org @ 2013-03-14 12:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56616
Bug #: 56616
Summary: gnatmake builds SAL incorrectly if library_kind is
"static"
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: simon@pushface.org
Created attachment 29665
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29665
Reproducer
Gnatmake will accept a GPR which calls for a stand-alone static library. The
library that is created will not work if the library implementation requires
linking or elaboration that is not already implied by the user program or the
library interface units: for example, if the library implementation uses
tasking but the user program does not, either libgnarl won't be included in the
link or tasking won't be initialized (so only the first entry in the
environment task's TCB's Entry_Calls is initialized).
I beg you not to respond by disabling static SALs: the ability to populate the
Library_Src_Dir with the library's interface source is valuable.
Using the attached demonstrator (static-sal-bug.tar.gz) results in
$ gnatmake -p -P build_library.gpr
object directory "/Users/simon/tmp/static-sal-bug/.build-lib" created for
project build_library
library directory "/Users/simon/tmp/static-sal-bug/lib" created for project
build_library
library source copy directory "/Users/simon/tmp/static-sal-bug/include" created
for project build_library
gcc -c -g -I- -gnatA /Users/simon/tmp/static-sal-bug/src/library.adb
gcc -c -g -I- -gnatA /Users/simon/tmp/static-sal-bug/src/library_impl.adb
gnatbind -n -o b~ibrary.adb -Library -a ...
gcc -c -gnatws b~ibrary.adb -fPIC -g ...
building static library for project build_library
ar cr /Users/simon/tmp/static-sal-bug/lib/libibrary.a
/Users/simon/tmp/static-sal-bug/.build-lib/b~ibrary.o ...
ranlib /Users/simon/tmp/static-sal-bug/lib/libibrary.a
$ gnatmake -p -P locking.gpr
object directory "/Users/simon/tmp/static-sal-bug/.build" created for project
locking
gcc -c -g -I- -gnatA /Users/simon/tmp/static-sal-bug/locking.adb
gnatbind -E -x /Users/simon/tmp/static-sal-bug/.build/locking.ali
gnatlink /Users/simon/tmp/static-sal-bug/.build/locking.ali -g
/Users/simon/tmp/static-sal-bug/lib/libibrary.a
-Wl,-rpath,/opt/gcc-4.8-196573/lib/gcc/x86_64-apple-darwin12/4.8.0/adalib/ -o
/Users/simon/tmp/static-sal-bug/locking
Undefined symbols for architecture x86_64:
"_system__tasking__protected_objects__entries__finalize__2", referenced from:
_library_impl__poTVDF in libibrary.a(library_impl.o)
_library_impl__poTVIP__F12b.3417 in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__entries__initialize_protection_entries",
referenced from:
_library_impl__poTVIP in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__entries__lock_entries", referenced
from:
_library_impl__po__releaseP in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__entries__protection_entriesIP",
referenced from:
_library_impl__poTVIP in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__operations__communication_blockIP",
referenced from:
_library_impl__seize in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__operations__complete_entry_body",
referenced from:
_library_impl__po__seize_E3b in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__operations__exceptional_complete_entry_body",
referenced from:
_library_impl__po__seize_E3b in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__operations__protected_entry_call",
referenced from:
_library_impl__seize in libibrary.a(library_impl.o)
"_system__tasking__protected_objects__operations__service_entries",
referenced from:
_library_impl__po__releaseP___finalizer.3471 in
libibrary.a(library_impl.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gnatlink: error when calling /opt/gcc-4.8-196573/bin/gcc
gnatmake: *** link failed.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug ada/56616] gnatmake builds SAL incorrectly if library_kind is "static"
2013-03-14 12:25 [Bug ada/56616] New: gnatmake builds SAL incorrectly if library_kind is "static" simon at pushface dot org
@ 2013-03-14 12:30 ` simon at pushface dot org
0 siblings, 0 replies; 2+ messages in thread
From: simon at pushface dot org @ 2013-03-14 12:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56616
--- Comment #1 from simon at pushface dot org 2013-03-14 12:30:33 UTC ---
Created attachment 29667
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29667
Proposed patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-14 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14 12:25 [Bug ada/56616] New: gnatmake builds SAL incorrectly if library_kind is "static" simon at pushface dot org
2013-03-14 12:30 ` [Bug ada/56616] " simon at pushface dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).