mirror of
https://github.com/golang/go
synced 2024-11-21 20:14:52 -07:00
makefiles: use correct gcc order in case --as-needed is in use.
Suggested by eostapets. Fixes #141. R=r https://golang.org/cl/155049
This commit is contained in:
parent
0238fd836f
commit
cc3524fb06
@ -112,7 +112,7 @@ _CGO_LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup
|
|||||||
gcc $(_CGO_CFLAGS_$(GOARCH)) -fPIC -O2 -o $@ -c $(CGO_CFLAGS) $*.cgo4.c
|
gcc $(_CGO_CFLAGS_$(GOARCH)) -fPIC -O2 -o $@ -c $(CGO_CFLAGS) $*.cgo4.c
|
||||||
|
|
||||||
$(elem)_%.so: %.cgo4.o
|
$(elem)_%.so: %.cgo4.o
|
||||||
gcc $(_CGO_CFLAGS_$(GOARCH)) $(_CGO_LDFLAGS_$(GOOS)) -o $@ $*.cgo4.o $(CGO_LDFLAGS)
|
gcc $(_CGO_CFLAGS_$(GOARCH)) -o $@ $*.cgo4.o $(CGO_LDFLAGS) $(_CGO_LDFLAGS_$(GOOS))
|
||||||
|
|
||||||
$(pkgdir)/$(dir)/$(elem)_%.so: $(elem)_%.so
|
$(pkgdir)/$(dir)/$(elem)_%.so: $(elem)_%.so
|
||||||
@test -d $(GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
|
@test -d $(GOROOT)/pkg && mkdir -p $(pkgdir)/$(dir)
|
||||||
|
@ -24,7 +24,7 @@ LDFLAGS_darwin=-dynamiclib -Wl,-undefined,dynamic_lookup /usr/lib/libpthread.dyl
|
|||||||
gcc $(CFLAGS_$(GOARCH)) -O2 -fPIC -o $@ -c $*.S
|
gcc $(CFLAGS_$(GOARCH)) -O2 -fPIC -o $@ -c $*.S
|
||||||
|
|
||||||
libcgo.so: $(OFILES)
|
libcgo.so: $(OFILES)
|
||||||
gcc $(CFLAGS_$(GOARCH)) $(LDFLAGS_$(GOOS)) -o libcgo.so $(OFILES)
|
gcc $(CFLAGS_$(GOARCH)) -o libcgo.so $(OFILES) $(LDFLAGS_$(GOOS))
|
||||||
|
|
||||||
$(GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so: libcgo.so
|
$(GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so: libcgo.so
|
||||||
cp libcgo.so $@
|
cp libcgo.so $@
|
||||||
|
Loading…
Reference in New Issue
Block a user