Replace -nostdlib with -nodefaultlibs

This commit is contained in:
avdgrinten 2016-10-23 15:28:17 +02:00
parent 0d463390fb
commit 63340ec1f7
3 changed files with 2 additions and 6 deletions

View file

@ -3,7 +3,7 @@ $c_BINDIR := $(BUILD_PATH)/$c/bin
$c_LIBRARY_OBJS :=
$c_LDFLAGS := -nostdlib
$c_LDFLAGS := -nodefaultlibs
$c_TARGETS := clean-$c gen-$c install-$c install-headers-$c $($c_BINDIR)/libc.so

View file

@ -51,10 +51,6 @@ LibraryGuard::LibraryGuard() {
__mlibc_reinitPosixPipe();
}
// __dso_handle is usually defined in crtbeginS.o
// Since we link with -nostdlib we have to manually define it here
__attribute__ (( visibility("hidden") )) void *__dso_handle;
extern "C" int main(int argc, char *argv[], char *env[]);
// not declared in any header

View file

@ -5,7 +5,7 @@ $c_OBJDIR := $(BUILD_PATH)/$c/obj
$c_LIBRARY_OBJS := $($c_OBJDIR)/dummy.o
$c_LDFLAGS := -nostdlib
$c_LDFLAGS := -nodefaultlibs
$c_TARGETS := clean-$c install-$c $($c_BINDIR)/libm.so