While poking the GCC documentation I found that there's a feature available to limit the exported symbols (with GCC >= 3.3). Maybe worth considering? It's probably a design decision. If there's an option to limit the exported symbols or make all available, which one should be taken?

http://gcc.gnu.org/wiki/Visibility
http://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/Function-Attributes.html#Function-Attributes

This can be done by adding C<-fvisibility=hidden> to CFLAGS and setting PARROT_API to C<__attribute__ ((visibility("default")))>.


If you're trying this, prepare to kill io_4 quickly while t/src/io.t is running, as it would print "16777215:" for a very, very long time (there's already a ticket for this). The following is r18140 on Ubuntu, using GCC 4.1.2.

>prove t/src/io.t
...
t/src/io....ok 15/20# 'cc -L/usr/local/lib -Wl,-E t/src/io_16.o src/parrot_config.o -o t/src/io_16 -Wl,-rpath=/home/rb lasch/src/parrot/trunk/blib/lib -Lblib/lib -lparrot -lpthread -lm -L/usr/lib -licuuc -licudata -lpthread -lm -ldl -lm -
lpthread -lcrypt -lrt -lgmp -lreadline -lncurses' failed with exit code 1
# Failed to build 't/src/io_16': t/src/io_16.o: In function `the_test':
# t/src/io_16.c:31: undefined reference to `PIO_make_offset'
# collect2: ld returned 1 exit status

#     Failed test (t/src/io.t at line 506)
t/src/io....NOK 16# 'cc -L/usr/local/lib -Wl,-E t/src/io_17.o src/parrot_config.o -o t/src/io_17 -Wl,-rpath=/home/rbla sch/src/parrot/trunk/blib/lib -Lblib/lib -lparrot -lpthread -lm -L/usr/lib -licuuc -licudata -lpthread -lm -ldl -lm -lp
thread -lcrypt -lrt -lgmp -lreadline -lncurses' failed with exit code 1
# Failed to build 't/src/io_17': t/src/io_17.o: In function `the_test':
# t/src/io_17.c:46: undefined reference to `PIO_make_offset'
# collect2: ld returned 1 exit status

#     Failed test (t/src/io.t at line 538)
t/src/io....NOK 17# 'cc -L/usr/local/lib -Wl,-E t/src/io_18.o src/parrot_config.o -o t/src/io_18 -Wl,-rpath=/home/rbla sch/src/parrot/trunk/blib/lib -Lblib/lib -lparrot -lpthread -lm -L/usr/lib -licuuc -licudata -lpthread -lm -ldl -lm -lp
thread -lcrypt -lrt -lgmp -lreadline -lncurses' failed with exit code 1
# Failed to build 't/src/io_18': t/src/io_18.o: In function `the_test':
# t/src/io_18.c:33: undefined reference to `PIO_STDOUT'
# collect2: ld returned 1 exit status

#     Failed test (t/src/io.t at line 593)
t/src/io....NOK 18# 'cc -L/usr/local/lib -Wl,-E t/src/io_19.o src/parrot_config.o -o t/src/io_19 -Wl,-rpath=/home/rbla sch/src/parrot/trunk/blib/lib -Lblib/lib -lparrot -lpthread -lm -L/usr/lib -licuuc -licudata -lpthread -lm -ldl -lm -lp
thread -lcrypt -lrt -lgmp -lreadline -lncurses' failed with exit code 1
# Failed to build 't/src/io_19': t/src/io_19.o: In function `the_test':
# t/src/io_19.c:29: undefined reference to `pio_stdio_layer'
# collect2: ld returned 1 exit status

#     Failed test (t/src/io.t at line 628)
t/src/io....ok 20/20# Looks like you failed 9 tests of 20.
t/src/io....dubious
        Test returned status 9 (wstat 2304, 0x900)
DIED. FAILED tests 2-4, 6-7, 16-19
        Failed 9/20 tests, 55.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/src/io.t     9  2304    20    9  45.00%  2-4 6-7 16-19
Failed 1/1 test scripts, 0.00% okay. 9/20 subtests failed, 55.00% okay.


Ron

Reply via email to