openrisc / newlib

newlib OpenRISC development
GNU General Public License v2.0
24 stars 24 forks source link

libgloss: Remove duplicate definition of environ #10

Closed stffrdhrn closed 8 years ago

stffrdhrn commented 8 years ago

Environ is defined in libgloss and libc:

When linking we sometimes get errors: or1k-elf-g++ test.o -mnewlib -mboard=or1ksim -lm -o test /opt/shorne/software/or1k/lib/gcc/or1k-elf/5.3.0/../../../../or1k-elf/lib/libor1k.a(syscalls.o):(.data+0x0): multiple definition of `environ' /opt/shorne/software/or1k/lib/gcc/or1k-elf/5.3.0/../../../../or1k-elf/lib/libc.a(lib_a-environ.o):(.data+0x0): first defined here collect2: error: ld returned 1 exit status

This doesnt happen after the fix. Basic things build fine too.

olofk commented 8 years ago

I'm fine with this patch. It's in line with what other arches do

wallento commented 8 years ago

Looks good, let me just trigger travis again, there seems to be a git hickup at binutils.

wallento commented 8 years ago

In the logs of travis I see many warnings related to ctors: https://travis-ci.org/openrisc/newlib/jobs/139747292

Are they somehow related?

olofk commented 8 years ago

Perhaps they are related to https://github.com/openrisc/newlib/pull/9 ?

stffrdhrn commented 8 years ago

Yes, this looks related to #9. I'll fix it, sorry I didnt notice as I didnt build gcc after building newlib, will do that from now

wallento commented 8 years ago

Yeah, sorry, I mixed them both up now :(

I will revert the #9 and please amend there. Thanks!

stffrdhrn commented 8 years ago

I commented on #11, I think both #9 and #10 (this one) are still ok.

wallento commented 8 years ago

Excellent, thanks for checking!