aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/go/gofrontend/unsafe.cc4
-rw-r--r--libgo/Makefile.am338
-rw-r--r--libgo/Makefile.in383
-rw-r--r--libgo/go/bytes/indexbyte.c4
-rw-r--r--libgo/go/encoding/xml/marshal_test.go2
-rw-r--r--libgo/go/html/template/escape_test.go2
-rw-r--r--libgo/go/reflect/all_test.go2
-rw-r--r--libgo/go/regexp/all_test.go3
-rw-r--r--libgo/go/regexp/exec_test.go22
-rw-r--r--libgo/go/regexp/export_test.go15
-rw-r--r--libgo/go/regexp/find_test.go4
-rw-r--r--libgo/go/sync/atomic/atomic.c46
-rw-r--r--libgo/go/syscall/errno.c4
-rw-r--r--libgo/go/syscall/signame.c2
-rw-r--r--libgo/go/syscall/wait.c18
-rw-r--r--libgo/runtime/chan.c12
-rw-r--r--libgo/runtime/cpuprof.c4
-rw-r--r--libgo/runtime/go-breakpoint.c2
-rw-r--r--libgo/runtime/go-caller.c8
-rw-r--r--libgo/runtime/go-callers.c2
-rw-r--r--libgo/runtime/go-getgoroot.c2
-rw-r--r--libgo/runtime/go-now.c2
-rw-r--r--libgo/runtime/go-reflect-map.c14
-rw-r--r--libgo/runtime/go-setenv.c2
-rw-r--r--libgo/runtime/go-signal.c2
-rw-r--r--libgo/runtime/go-typestring.c2
-rw-r--r--libgo/runtime/go-unsafe-new.c2
-rw-r--r--libgo/runtime/go-unsafe-newarray.c2
-rw-r--r--libgo/runtime/go-unsafe-pointer.c4
-rw-r--r--libgo/runtime/goc2c.c21
-rw-r--r--libgo/runtime/malloc.goc4
-rw-r--r--libgo/runtime/malloc.h2
-rw-r--r--libgo/runtime/mgc0.c2
-rw-r--r--libgo/runtime/proc.c12
-rw-r--r--libgo/runtime/runtime.c4
-rw-r--r--libgo/runtime/runtime.h16
-rwxr-xr-xlibgo/testsuite/gotest33
37 files changed, 526 insertions, 477 deletions
diff --git a/gcc/go/gofrontend/unsafe.cc b/gcc/go/gofrontend/unsafe.cc
index 5d0c658..e7c61f0 100644
--- a/gcc/go/gofrontend/unsafe.cc
+++ b/gcc/go/gofrontend/unsafe.cc
@@ -22,8 +22,8 @@ Gogo::import_unsafe(const std::string& local_name, bool is_local_name_exported,
bool add_to_globals;
Package* package = this->add_imported_package("unsafe", local_name,
is_local_name_exported,
- "libgo_unsafe.unsafe",
- location, &add_to_globals);
+ "unsafe", location,
+ &add_to_globals);
if (package == NULL)
{
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 074d664..f48a42c 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -488,31 +488,31 @@ goc2c: goc2c.$(OBJEXT)
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
malloc.c: $(srcdir)/runtime/malloc.goc goc2c
- ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
mprof.c: $(srcdir)/runtime/mprof.goc goc2c
- ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
reflect.c: $(srcdir)/runtime/reflect.goc goc2c
- ./goc2c --gcc --go-prefix libgo_reflect $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
runtime1.c: $(srcdir)/runtime/runtime1.goc goc2c
- ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
sema.c: $(srcdir)/runtime/sema.goc goc2c
- ./goc2c --gcc --go-prefix libgo_sync $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
sigqueue.c: $(srcdir)/runtime/sigqueue.goc goc2c
- ./goc2c --gcc --go-prefix libgo_os $< > $@.tmp
+ ./goc2c --gcc --go-pkgpath os_signal $< > $@.tmp
mv -f $@.tmp $@
time.c: $(srcdir)/runtime/time.goc goc2c
- ./goc2c --gcc --go-prefix libgo_time $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
%.c: $(srcdir)/runtime/%.goc goc2c
@@ -1604,33 +1604,38 @@ os_lib_inotify_lo =
endif
libgo_go_objs = \
- bufio/bufio.lo \
- bytes/bytes.lo \
+ bufio.lo \
+ bytes.lo \
bytes/index.lo \
- crypto/crypto.lo \
- errors/errors.lo \
- expvar/expvar.lo \
- flag/flag.lo \
- fmt/fmt.lo \
- hash/hash.lo \
- html/html.lo \
- image/image.lo \
- io/io.lo \
- log/log.lo \
- math/math.lo \
- net/net.lo \
- os/exec.lo \
- os/os.lo \
- path/path.lo \
- reflect/reflect.lo \
- regexp/regexp.lo \
- runtime/runtime.lo \
- sort/sort.lo \
- strconv/strconv.lo \
- strings/strings.lo \
- sync/sync.lo \
- time/time.lo \
- unicode/unicode.lo \
+ crypto.lo \
+ errors.lo \
+ expvar.lo \
+ flag.lo \
+ fmt.lo \
+ hash.lo \
+ html.lo \
+ image.lo \
+ io.lo \
+ log.lo \
+ math.lo \
+ mime.lo \
+ net.lo \
+ os.lo \
+ path.lo \
+ reflect-go.lo \
+ regexp.lo \
+ runtime-go.lo \
+ sort.lo \
+ strconv.lo \
+ strings.lo \
+ sync.lo \
+ syscall.lo \
+ syscall/errno.lo \
+ syscall/signame.lo \
+ syscall/wait.lo \
+ testing.lo \
+ time-go.lo \
+ unicode.lo \
archive/tar.lo \
archive/zip.lo \
compress/bzip2.lo \
@@ -1713,7 +1718,6 @@ libgo_go_objs = \
math/big.lo \
math/cmplx.lo \
math/rand.lo \
- mime/mime.lo \
mime/multipart.lo \
net/http.lo \
net/mail.lo \
@@ -1724,6 +1728,7 @@ libgo_go_objs = \
old/netchan.lo \
old/regexp.lo \
old/template.lo \
+ os/exec.lo \
$(os_lib_inotify_lo) \
os/signal.lo \
os/user.lo \
@@ -1734,15 +1739,10 @@ libgo_go_objs = \
runtime/pprof.lo \
sync/atomic.lo \
sync/atomic_c.lo \
- syscall/syscall.lo \
- syscall/errno.lo \
- syscall/signame.lo \
- syscall/wait.lo \
text/scanner.lo \
text/tabwriter.lo \
text/template.lo \
text/template/parse.lo \
- testing/testing.lo \
testing/iotest.lo \
testing/quick.lo \
unicode/utf16.lo \
@@ -1780,7 +1780,7 @@ BUILDDEPS = \
BUILDPACKAGE = \
$(MKDIR_P) $(@D); \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
- $(LTGOCOMPILE) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
+ $(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's/-go$$//'` -o $@ $$files
if LIBGO_IS_RTEMS
use_dejagnu = yes
@@ -1805,12 +1805,10 @@ CHECK = \
LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
export LD_LIBRARY_PATH; \
rm -f $@-testsum $@-testlog; \
- prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
- test "$${prefix}" != "." || prefix="$(@D)"; \
if test "$(use_dejagnu)" = "yes"; then \
- $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \
+ $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \
else \
- if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
+ if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \
@@ -1852,258 +1850,249 @@ CHECK_DEPS = libgo.la libgobegin.a \
$(toolexeclibgotexttemplate_DATA) \
$(toolexeclibgounicode_DATA)
-@go_include@ bufio/bufio.lo.dep
-bufio/bufio.lo.dep: $(go_bufio_files)
+@go_include@ bufio.lo.dep
+bufio.lo.dep: $(go_bufio_files)
$(BUILDDEPS)
-bufio/bufio.lo: $(go_bufio_files)
+bufio.lo: $(go_bufio_files)
$(BUILDPACKAGE)
bufio/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: bufio/check
-@go_include@ bytes/bytes.lo.dep
-bytes/bytes.lo.dep: $(go_bytes_files)
+@go_include@ bytes.lo.dep
+bytes.lo.dep: $(go_bytes_files)
$(BUILDDEPS)
-bytes/bytes.lo: $(go_bytes_files)
+bytes.lo: $(go_bytes_files)
$(BUILDPACKAGE)
-bytes/index.lo: $(go_bytes_c_files) bytes/bytes.lo
+bytes/index.lo: $(go_bytes_c_files)
+ @$(MKDIR_P) bytes
$(LTCOMPILE) -c -o bytes/index.lo $(srcdir)/go/bytes/indexbyte.c
bytes/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: bytes/check
-@go_include@ crypto/crypto.lo.dep
-crypto/crypto.lo.dep: $(go_crypto_files)
+@go_include@ crypto.lo.dep
+crypto.lo.dep: $(go_crypto_files)
$(BUILDDEPS)
-crypto/crypto.lo: $(go_crypto_files)
+crypto.lo: $(go_crypto_files)
$(BUILDPACKAGE)
crypto/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: crypto/check
-@go_include@ errors/errors.lo.dep
-errors/errors.lo.dep: $(go_errors_files)
+@go_include@ errors.lo.dep
+errors.lo.dep: $(go_errors_files)
$(BUILDDEPS)
-errors/errors.lo: $(go_errors_files)
+errors.lo: $(go_errors_files)
$(BUILDPACKAGE)
errors/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: errors/check
-@go_include@ expvar/expvar.lo.dep
-expvar/expvar.lo.dep: $(go_expvar_files)
+@go_include@ expvar.lo.dep
+expvar.lo.dep: $(go_expvar_files)
$(BUILDDEPS)
-expvar/expvar.lo: $(go_expvar_files)
+expvar.lo: $(go_expvar_files)
$(BUILDPACKAGE)
expvar/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: expvar/check
-@go_include@ flag/flag.lo.dep
-flag/flag.lo.dep: $(go_flag_files)
+@go_include@ flag.lo.dep
+flag.lo.dep: $(go_flag_files)
$(BUILDDEPS)
-flag/flag.lo: $(go_flag_files)
+flag.lo: $(go_flag_files)
$(BUILDPACKAGE)
flag/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: flag/check
-@go_include@ fmt/fmt.lo.dep
-fmt/fmt.lo.dep: $(go_fmt_files)
+@go_include@ fmt.lo.dep
+fmt.lo.dep: $(go_fmt_files)
$(BUILDDEPS)
-fmt/fmt.lo: $(go_fmt_files)
+fmt.lo: $(go_fmt_files)
$(BUILDPACKAGE)
fmt/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: fmt/check
-@go_include@ hash/hash.lo.dep
-hash/hash.lo.dep: $(go_hash_files)
+@go_include@ hash.lo.dep
+hash.lo.dep: $(go_hash_files)
$(BUILDDEPS)
-hash/hash.lo: $(go_hash_files)
+hash.lo: $(go_hash_files)
$(BUILDPACKAGE)
hash/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: hash/check
-@go_include@ html/html.lo.dep
-html/html.lo.dep: $(go_html_files)
+@go_include@ html.lo.dep
+html.lo.dep: $(go_html_files)
$(BUILDDEPS)
-html/html.lo: $(go_html_files)
+html.lo: $(go_html_files)
$(BUILDPACKAGE)
html/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: html/check
-@go_include@ image/image.lo.dep
-image/image.lo.dep: $(go_image_files)
+@go_include@ image.lo.dep
+image.lo.dep: $(go_image_files)
$(BUILDDEPS)
-image/image.lo: $(go_image_files)
+image.lo: $(go_image_files)
$(BUILDPACKAGE)
image/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: image/check
-@go_include@ io/io.lo.dep
-io/io.lo.dep: $(go_io_files)
+@go_include@ io.lo.dep
+io.lo.dep: $(go_io_files)
$(BUILDDEPS)
-io/io.lo: $(go_io_files)
+io.lo: $(go_io_files)
$(BUILDPACKAGE)
io/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: io/check
-@go_include@ log/log.lo.dep
-log/log.lo.dep: $(go_log_files)
+@go_include@ log.lo.dep
+log.lo.dep: $(go_log_files)
$(BUILDDEPS)
-log/log.lo: $(go_log_files)
+log.lo: $(go_log_files)
$(BUILDPACKAGE)
log/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: log/check
-@go_include@ math/math.lo.dep
-math/math.lo.dep: $(go_math_files)
+@go_include@ math.lo.dep
+math.lo.dep: $(go_math_files)
$(BUILDDEPS)
-math/math.lo: $(go_math_files)
+math.lo: $(go_math_files)
$(MKDIR_P) $(@D)
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
- $(LTGOCOMPILE) $(MATH_FLAG) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
+ $(LTGOCOMPILE) $(MATH_FLAG) -I . -c -fgo-pkgpath=math -o $@ $$files
math/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: math/check
-@go_include@ mime/mime.lo.dep
-mime/mime.lo.dep: $(go_mime_files)
+@go_include@ mime.lo.dep
+mime.lo.dep: $(go_mime_files)
$(BUILDDEPS)
-mime/mime.lo: $(go_mime_files)
+mime.lo: $(go_mime_files)
$(BUILDPACKAGE)
mime/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: mime/check
-@go_include@ net/net.lo.dep
-net/net.lo.dep: $(go_net_files)
+@go_include@ net.lo.dep
+net.lo.dep: $(go_net_files)
$(BUILDDEPS)
-net/net.lo: $(go_net_files)
+net.lo: $(go_net_files)
$(BUILDPACKAGE)
net/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: net/check
-@go_include@ os/os.lo.dep
-os/os.lo.dep: $(go_os_files)
+@go_include@ os.lo.dep
+os.lo.dep: $(go_os_files)
$(BUILDDEPS)
-os/os.lo: $(go_os_files)
+os.lo: $(go_os_files)
$(BUILDPACKAGE)
os/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: os/check
-@go_include@ path/path.lo.dep
-path/path.lo.dep: $(go_path_files)
+@go_include@ path.lo.dep
+path.lo.dep: $(go_path_files)
$(BUILDDEPS)
-path/path.lo: $(go_path_files)
+path.lo: $(go_path_files)
$(BUILDPACKAGE)
path/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: path/check
-@go_include@ reflect/reflect.lo.dep
-reflect/reflect.lo.dep: $(go_reflect_files)
+@go_include@ reflect-go.lo.dep
+reflect-go.lo.dep: $(go_reflect_files)
$(BUILDDEPS)
-reflect/reflect.lo: $(go_reflect_files)
+reflect-go.lo: $(go_reflect_files)
$(BUILDPACKAGE)
reflect/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: reflect/check
-@go_include@ regexp/regexp.lo.dep
-regexp/regexp.lo.dep: $(go_regexp_files)
+@go_include@ regexp.lo.dep
+regexp.lo.dep: $(go_regexp_files)
$(BUILDDEPS)
-regexp/regexp.lo: $(go_regexp_files)
+regexp.lo: $(go_regexp_files)
$(BUILDPACKAGE)
regexp/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: regexp/check
-@go_include@ runtime/runtime.lo.dep
-runtime/runtime.lo.dep: $(go_runtime_files)
+@go_include@ runtime-go.lo.dep
+runtime-go.lo.dep: $(go_runtime_files)
$(BUILDDEPS)
-runtime/runtime.lo: $(go_runtime_files)
+runtime-go.lo: $(go_runtime_files)
$(BUILDPACKAGE)
runtime/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: runtime/check
-@go_include@ text/scanner.lo.dep
-text/scanner.lo.dep: $(go_text_scanner_files)
- $(BUILDDEPS)
-text/scanner.lo: $(go_text_scanner_files)
- $(BUILDPACKAGE)
-text/scanner/check: $(CHECK_DEPS)
- @$(MKDIR_P) text/scanner
- @$(CHECK)
-.PHONY: text/scanner/check
-
-@go_include@ sort/sort.lo.dep
-sort/sort.lo.dep: $(go_sort_files)
+@go_include@ sort.lo.dep
+sort.lo.dep: $(go_sort_files)
$(BUILDDEPS)
-sort/sort.lo: $(go_sort_files)
+sort.lo: $(go_sort_files)
$(BUILDPACKAGE)
sort/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: sort/check
-@go_include@ strconv/strconv.lo.dep
-strconv/strconv.lo.dep: $(go_strconv_files)
+@go_include@ strconv.lo.dep
+strconv.lo.dep: $(go_strconv_files)
$(BUILDDEPS)
-strconv/strconv.lo: $(go_strconv_files)
+strconv.lo: $(go_strconv_files)
$(BUILDPACKAGE)
strconv/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: strconv/check
-@go_include@ strings/strings.lo.dep
-strings/strings.lo.dep: $(go_strings_files)
+@go_include@ strings.lo.dep
+strings.lo.dep: $(go_strings_files)
$(BUILDDEPS)
-strings/strings.lo: $(go_strings_files)
+strings.lo: $(go_strings_files)
$(BUILDPACKAGE)
strings/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: strings/check
-@go_include@ sync/sync.lo.dep
-sync/sync.lo.dep: $(go_sync_files)
+@go_include@ sync.lo.dep
+sync.lo.dep: $(go_sync_files)
$(BUILDDEPS)
-sync/sync.lo: $(go_sync_files)
+sync.lo: $(go_sync_files)
$(BUILDPACKAGE)
sync/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: sync/check
-@go_include@ testing/testing.lo.dep
-testing/testing.lo.dep: $(go_testing_files)
+@go_include@ testing.lo.dep
+testing.lo.dep: $(go_testing_files)
$(BUILDDEPS)
-testing/testing.lo: $(go_testing_files)
+testing.lo: $(go_testing_files)
$(BUILDPACKAGE)
testing/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: testing/check
-@go_include@ time/time.lo.dep
-time/time.lo.dep: $(go_time_files)
+@go_include@ time-go.lo.dep
+time-go.lo.dep: $(go_time_files)
$(BUILDDEPS)
-time/time.lo: $(go_time_files)
+time-go.lo: $(go_time_files)
$(BUILDPACKAGE)
time/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: time/check
-@go_include@ unicode/unicode.lo.dep
-unicode/unicode.lo.dep: $(go_unicode_files)
+@go_include@ unicode.lo.dep
+unicode.lo.dep: $(go_unicode_files)
$(BUILDDEPS)
-unicode/unicode.lo: $(go_unicode_files)
+unicode.lo: $(go_unicode_files)
$(BUILDPACKAGE)
unicode/check: $(CHECK_DEPS)
@$(CHECK)
@@ -3133,6 +3122,16 @@ sync/atomic/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: sync/atomic/check
+@go_include@ text/scanner.lo.dep
+text/scanner.lo.dep: $(go_text_scanner_files)
+ $(BUILDDEPS)
+text/scanner.lo: $(go_text_scanner_files)
+ $(BUILDPACKAGE)
+text/scanner/check: $(CHECK_DEPS)
+ @$(MKDIR_P) text/scanner
+ @$(CHECK)
+.PHONY: text/scanner/check
+
@go_include@ text/tabwriter.lo.dep
text/tabwriter.lo.dep: $(go_text_tabwriter_files)
$(BUILDDEPS)
@@ -3202,16 +3201,19 @@ unicode/utf8/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: unicode/utf8/check
-@go_include@ syscall/syscall.lo.dep
-syscall/syscall.lo.dep: $(go_syscall_files)
+@go_include@ syscall.lo.dep
+syscall.lo.dep: $(go_syscall_files)
$(BUILDDEPS)
-syscall/syscall.lo: $(go_syscall_files)
+syscall.lo: $(go_syscall_files)
$(BUILDPACKAGE)
syscall/errno.lo: go/syscall/errno.c
+ @$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $<
syscall/signame.lo: go/syscall/signame.c
+ @$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $<
syscall/wait.lo: go/syscall/wait.c
+ @$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $<
# How to build a .gox file from a .lo file.
@@ -3219,61 +3221,61 @@ BUILDGOX = \
f=`echo $< | sed -e 's/.lo$$/.o/'`; \
$(OBJCOPY) -j .go_export $$f $@.tmp && mv -f $@.tmp $@
-bufio.gox: bufio/bufio.lo
+bufio.gox: bufio.lo
$(BUILDGOX)
-bytes.gox: bytes/bytes.lo
+bytes.gox: bytes.lo
$(BUILDGOX)
-crypto.gox: crypto/crypto.lo
+crypto.gox: crypto.lo
$(BUILDGOX)
-errors.gox: errors/errors.lo
+errors.gox: errors.lo
$(BUILDGOX)
-expvar.gox: expvar/expvar.lo
+expvar.gox: expvar.lo
$(BUILDGOX)
-flag.gox: flag/flag.lo
+flag.gox: flag.lo
$(BUILDGOX)
-fmt.gox: fmt/fmt.lo
+fmt.gox: fmt.lo
$(BUILDGOX)
-hash.gox: hash/hash.lo
+hash.gox: hash.lo
$(BUILDGOX)
-html.gox: html/html.lo
+html.gox: html.lo
$(BUILDGOX)
-image.gox: image/image.lo
+image.gox: image.lo
$(BUILDGOX)
-io.gox: io/io.lo
+io.gox: io.lo
$(BUILDGOX)
-log.gox: log/log.lo
+log.gox: log.lo
$(BUILDGOX)
-math.gox: math/math.lo
+math.gox: math.lo
$(BUILDGOX)
-mime.gox: mime/mime.lo
+mime.gox: mime.lo
$(BUILDGOX)
-net.gox: net/net.lo
+net.gox: net.lo
$(BUILDGOX)
-os.gox: os/os.lo
+os.gox: os.lo
$(BUILDGOX)
-path.gox: path/path.lo
+path.gox: path.lo
$(BUILDGOX)
-reflect.gox: reflect/reflect.lo
+reflect.gox: reflect-go.lo
$(BUILDGOX)
-regexp.gox: regexp/regexp.lo
+regexp.gox: regexp.lo
$(BUILDGOX)
-runtime.gox: runtime/runtime.lo
+runtime.gox: runtime-go.lo
$(BUILDGOX)
-sort.gox: sort/sort.lo
+sort.gox: sort.lo
$(BUILDGOX)
-strconv.gox: strconv/strconv.lo
+strconv.gox: strconv.lo
$(BUILDGOX)
-strings.gox: strings/strings.lo
+strings.gox: strings.lo
$(BUILDGOX)
-sync.gox: sync/sync.lo
+sync.gox: sync.lo
$(BUILDGOX)
-syscall.gox: syscall/syscall.lo
+syscall.gox: syscall.lo
$(BUILDGOX)
-testing.gox: testing/testing.lo
+testing.gox: testing.lo
$(BUILDGOX)
-time.gox: time/time.lo
+time.gox: time-go.lo
$(BUILDGOX)
-unicode.gox: unicode/unicode.lo
+unicode.gox: unicode.lo
$(BUILDGOX)
archive/tar.gox: archive/tar.lo
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index bbec292..d7a2de6 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -133,21 +133,20 @@ am_libgobegin_a_OBJECTS = go-main.$(OBJEXT)
libgobegin_a_OBJECTS = $(am_libgobegin_a_OBJECTS)
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = bufio/bufio.lo bytes/bytes.lo bytes/index.lo \
- crypto/crypto.lo errors/errors.lo expvar/expvar.lo \
- flag/flag.lo fmt/fmt.lo hash/hash.lo html/html.lo \
- image/image.lo io/io.lo log/log.lo math/math.lo net/net.lo \
- os/exec.lo os/os.lo path/path.lo reflect/reflect.lo \
- regexp/regexp.lo runtime/runtime.lo sort/sort.lo \
- strconv/strconv.lo strings/strings.lo sync/sync.lo \
- time/time.lo unicode/unicode.lo archive/tar.lo archive/zip.lo \
- compress/bzip2.lo compress/flate.lo compress/gzip.lo \
- compress/lzw.lo compress/zlib.lo container/heap.lo \
- container/list.lo container/ring.lo crypto/aes.lo \
- crypto/cipher.lo crypto/des.lo crypto/dsa.lo crypto/ecdsa.lo \
- crypto/elliptic.lo crypto/hmac.lo crypto/md5.lo crypto/rand.lo \
- crypto/rc4.lo crypto/rsa.lo crypto/sha1.lo crypto/sha256.lo \
- crypto/sha512.lo crypto/subtle.lo crypto/tls.lo crypto/x509.lo \
+am__DEPENDENCIES_2 = bufio.lo bytes.lo bytes/index.lo crypto.lo \
+ errors.lo expvar.lo flag.lo fmt.lo hash.lo html.lo image.lo \
+ io.lo log.lo math.lo mime.lo net.lo os.lo path.lo \
+ reflect-go.lo regexp.lo runtime-go.lo sort.lo strconv.lo \
+ strings.lo sync.lo syscall.lo syscall/errno.lo \
+ syscall/signame.lo syscall/wait.lo testing.lo time-go.lo \
+ unicode.lo archive/tar.lo archive/zip.lo compress/bzip2.lo \
+ compress/flate.lo compress/gzip.lo compress/lzw.lo \
+ compress/zlib.lo container/heap.lo container/list.lo \
+ container/ring.lo crypto/aes.lo crypto/cipher.lo crypto/des.lo \
+ crypto/dsa.lo crypto/ecdsa.lo crypto/elliptic.lo \
+ crypto/hmac.lo crypto/md5.lo crypto/rand.lo crypto/rc4.lo \
+ crypto/rsa.lo crypto/sha1.lo crypto/sha256.lo crypto/sha512.lo \
+ crypto/subtle.lo crypto/tls.lo crypto/x509.lo \
crypto/x509/pkix.lo database/sql.lo database/sql/driver.lo \
debug/dwarf.lo debug/elf.lo debug/gosym.lo debug/macho.lo \
debug/pe.lo encoding/ascii85.lo encoding/asn1.lo \
@@ -163,15 +162,13 @@ am__DEPENDENCIES_2 = bufio/bufio.lo bytes/bytes.lo bytes/index.lo \
image/color.lo image/draw.lo image/gif.lo image/jpeg.lo \
image/png.lo index/suffixarray.lo io/ioutil.lo log/syslog.lo \
log/syslog/syslog_c.lo math/big.lo math/cmplx.lo math/rand.lo \
- mime/mime.lo mime/multipart.lo net/http.lo net/mail.lo \
- net/rpc.lo net/smtp.lo net/textproto.lo net/url.lo \
- old/netchan.lo old/regexp.lo old/template.lo \
- $(am__DEPENDENCIES_1) os/signal.lo os/user.lo path/filepath.lo \
- regexp/syntax.lo net/rpc/jsonrpc.lo runtime/debug.lo \
- runtime/pprof.lo sync/atomic.lo sync/atomic_c.lo \
- syscall/syscall.lo syscall/errno.lo syscall/signame.lo \
- syscall/wait.lo text/scanner.lo text/tabwriter.lo \
- text/template.lo text/template/parse.lo testing/testing.lo \
+ mime/multipart.lo net/http.lo net/mail.lo net/rpc.lo \
+ net/smtp.lo net/textproto.lo net/url.lo old/netchan.lo \
+ old/regexp.lo old/template.lo os/exec.lo $(am__DEPENDENCIES_1) \
+ os/signal.lo os/user.lo path/filepath.lo regexp/syntax.lo \
+ net/rpc/jsonrpc.lo runtime/debug.lo runtime/pprof.lo \
+ sync/atomic.lo sync/atomic_c.lo text/scanner.lo \
+ text/tabwriter.lo text/template.lo text/template/parse.lo \
testing/iotest.lo testing/quick.lo unicode/utf16.lo \
unicode/utf8.lo
libgo_la_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
@@ -1848,33 +1845,38 @@ go_syscall_c_files = \
# os_lib_inotify_lo = os/inotify.lo
@LIBGO_IS_LINUX_TRUE@os_lib_inotify_lo =
libgo_go_objs = \
- bufio/bufio.lo \
- bytes/bytes.lo \
+ bufio.lo \
+ bytes.lo \
bytes/index.lo \
- crypto/crypto.lo \
- errors/errors.lo \
- expvar/expvar.lo \
- flag/flag.lo \
- fmt/fmt.lo \
- hash/hash.lo \
- html/html.lo \
- image/image.lo \
- io/io.lo \
- log/log.lo \
- math/math.lo \
- net/net.lo \
- os/exec.lo \
- os/os.lo \
- path/path.lo \
- reflect/reflect.lo \
- regexp/regexp.lo \
- runtime/runtime.lo \
- sort/sort.lo \
- strconv/strconv.lo \
- strings/strings.lo \
- sync/sync.lo \
- time/time.lo \
- unicode/unicode.lo \
+ crypto.lo \
+ errors.lo \
+ expvar.lo \
+ flag.lo \
+ fmt.lo \
+ hash.lo \
+ html.lo \
+ image.lo \
+ io.lo \
+ log.lo \
+ math.lo \
+ mime.lo \
+ net.lo \
+ os.lo \
+ path.lo \
+ reflect-go.lo \
+ regexp.lo \
+ runtime-go.lo \
+ sort.lo \
+ strconv.lo \
+ strings.lo \
+ sync.lo \
+ syscall.lo \
+ syscall/errno.lo \
+ syscall/signame.lo \
+ syscall/wait.lo \
+ testing.lo \
+ time-go.lo \
+ unicode.lo \
archive/tar.lo \
archive/zip.lo \
compress/bzip2.lo \
@@ -1957,7 +1959,6 @@ libgo_go_objs = \
math/big.lo \
math/cmplx.lo \
math/rand.lo \
- mime/mime.lo \
mime/multipart.lo \
net/http.lo \
net/mail.lo \
@@ -1968,6 +1969,7 @@ libgo_go_objs = \
old/netchan.lo \
old/regexp.lo \
old/template.lo \
+ os/exec.lo \
$(os_lib_inotify_lo) \
os/signal.lo \
os/user.lo \
@@ -1978,15 +1980,10 @@ libgo_go_objs = \
runtime/pprof.lo \
sync/atomic.lo \
sync/atomic_c.lo \
- syscall/syscall.lo \
- syscall/errno.lo \
- syscall/signame.lo \
- syscall/wait.lo \
text/scanner.lo \
text/tabwriter.lo \
text/template.lo \
text/template/parse.lo \
- testing/testing.lo \
testing/iotest.lo \
testing/quick.lo \
unicode/utf16.lo \
@@ -2021,7 +2018,7 @@ BUILDDEPS = \
BUILDPACKAGE = \
$(MKDIR_P) $(@D); \
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
- $(LTGOCOMPILE) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
+ $(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's/-go$$//'` -o $@ $$files
@LIBGO_IS_RTEMS_FALSE@use_dejagnu = no
@LIBGO_IS_RTEMS_TRUE@use_dejagnu = yes
@@ -2042,12 +2039,10 @@ CHECK = \
LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
export LD_LIBRARY_PATH; \
rm -f $@-testsum $@-testlog; \
- prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
- test "$${prefix}" != "." || prefix="$(@D)"; \
if test "$(use_dejagnu)" = "yes"; then \
- $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \
+ $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \
else \
- if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
+ if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
echo "PASS: $(@D)" >> $@-testlog; \
echo "PASS: $(@D)"; \
echo "PASS: $(@D)" > $@-testsum; \
@@ -4315,31 +4310,31 @@ goc2c: goc2c.$(OBJEXT)
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
malloc.c: $(srcdir)/runtime/malloc.goc goc2c
- ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
mprof.c: $(srcdir)/runtime/mprof.goc goc2c
- ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
reflect.c: $(srcdir)/runtime/reflect.goc goc2c
- ./goc2c --gcc --go-prefix libgo_reflect $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
runtime1.c: $(srcdir)/runtime/runtime1.goc goc2c
- ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
sema.c: $(srcdir)/runtime/sema.goc goc2c
- ./goc2c --gcc --go-prefix libgo_sync $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
sigqueue.c: $(srcdir)/runtime/sigqueue.goc goc2c
- ./goc2c --gcc --go-prefix libgo_os $< > $@.tmp
+ ./goc2c --gcc --go-pkgpath os_signal $< > $@.tmp
mv -f $@.tmp $@
time.c: $(srcdir)/runtime/time.goc goc2c
- ./goc2c --gcc --go-prefix libgo_time $< > $@.tmp
+ ./goc2c --gcc $< > $@.tmp
mv -f $@.tmp $@
%.c: $(srcdir)/runtime/%.goc goc2c
@@ -4408,258 +4403,249 @@ s-epoll: Makefile
$(SHELL) $(srcdir)/../move-if-change epoll.go.tmp epoll.go
$(STAMP) $@
-@go_include@ bufio/bufio.lo.dep
-bufio/bufio.lo.dep: $(go_bufio_files)
+@go_include@ bufio.lo.dep
+bufio.lo.dep: $(go_bufio_files)
$(BUILDDEPS)
-bufio/bufio.lo: $(go_bufio_files)
+bufio.lo: $(go_bufio_files)
$(BUILDPACKAGE)
bufio/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: bufio/check
-@go_include@ bytes/bytes.lo.dep
-bytes/bytes.lo.dep: $(go_bytes_files)
+@go_include@ bytes.lo.dep
+bytes.lo.dep: $(go_bytes_files)
$(BUILDDEPS)
-bytes/bytes.lo: $(go_bytes_files)
+bytes.lo: $(go_bytes_files)
$(BUILDPACKAGE)
-bytes/index.lo: $(go_bytes_c_files) bytes/bytes.lo
+bytes/index.lo: $(go_bytes_c_files)
+ @$(MKDIR_P) bytes
$(LTCOMPILE) -c -o bytes/index.lo $(srcdir)/go/bytes/indexbyte.c
bytes/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: bytes/check
-@go_include@ crypto/crypto.lo.dep
-crypto/crypto.lo.dep: $(go_crypto_files)
+@go_include@ crypto.lo.dep
+crypto.lo.dep: $(go_crypto_files)
$(BUILDDEPS)
-crypto/crypto.lo: $(go_crypto_files)
+crypto.lo: $(go_crypto_files)
$(BUILDPACKAGE)
crypto/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: crypto/check
-@go_include@ errors/errors.lo.dep
-errors/errors.lo.dep: $(go_errors_files)
+@go_include@ errors.lo.dep
+errors.lo.dep: $(go_errors_files)
$(BUILDDEPS)
-errors/errors.lo: $(go_errors_files)
+errors.lo: $(go_errors_files)
$(BUILDPACKAGE)
errors/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: errors/check
-@go_include@ expvar/expvar.lo.dep
-expvar/expvar.lo.dep: $(go_expvar_files)
+@go_include@ expvar.lo.dep
+expvar.lo.dep: $(go_expvar_files)
$(BUILDDEPS)
-expvar/expvar.lo: $(go_expvar_files)
+expvar.lo: $(go_expvar_files)
$(BUILDPACKAGE)
expvar/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: expvar/check
-@go_include@ flag/flag.lo.dep
-flag/flag.lo.dep: $(go_flag_files)
+@go_include@ flag.lo.dep
+flag.lo.dep: $(go_flag_files)
$(BUILDDEPS)
-flag/flag.lo: $(go_flag_files)
+flag.lo: $(go_flag_files)
$(BUILDPACKAGE)
flag/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: flag/check
-@go_include@ fmt/fmt.lo.dep
-fmt/fmt.lo.dep: $(go_fmt_files)
+@go_include@ fmt.lo.dep
+fmt.lo.dep: $(go_fmt_files)
$(BUILDDEPS)
-fmt/fmt.lo: $(go_fmt_files)
+fmt.lo: $(go_fmt_files)
$(BUILDPACKAGE)
fmt/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: fmt/check
-@go_include@ hash/hash.lo.dep
-hash/hash.lo.dep: $(go_hash_files)
+@go_include@ hash.lo.dep
+hash.lo.dep: $(go_hash_files)
$(BUILDDEPS)
-hash/hash.lo: $(go_hash_files)
+hash.lo: $(go_hash_files)
$(BUILDPACKAGE)
hash/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: hash/check
-@go_include@ html/html.lo.dep
-html/html.lo.dep: $(go_html_files)
+@go_include@ html.lo.dep
+html.lo.dep: $(go_html_files)
$(BUILDDEPS)
-html/html.lo: $(go_html_files)
+html.lo: $(go_html_files)
$(BUILDPACKAGE)
html/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: html/check
-@go_include@ image/image.lo.dep
-image/image.lo.dep: $(go_image_files)
+@go_include@ image.lo.dep
+image.lo.dep: $(go_image_files)
$(BUILDDEPS)
-image/image.lo: $(go_image_files)
+image.lo: $(go_image_files)
$(BUILDPACKAGE)
image/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: image/check
-@go_include@ io/io.lo.dep
-io/io.lo.dep: $(go_io_files)
+@go_include@ io.lo.dep
+io.lo.dep: $(go_io_files)
$(BUILDDEPS)
-io/io.lo: $(go_io_files)
+io.lo: $(go_io_files)
$(BUILDPACKAGE)
io/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: io/check
-@go_include@ log/log.lo.dep
-log/log.lo.dep: $(go_log_files)
+@go_include@ log.lo.dep
+log.lo.dep: $(go_log_files)
$(BUILDDEPS)
-log/log.lo: $(go_log_files)
+log.lo: $(go_log_files)
$(BUILDPACKAGE)
log/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: log/check
-@go_include@ math/math.lo.dep
-math/math.lo.dep: $(go_math_files)
+@go_include@ math.lo.dep
+math.lo.dep: $(go_math_files)
$(BUILDDEPS)
-math/math.lo: $(go_math_files)
+math.lo: $(go_math_files)
$(MKDIR_P) $(@D)
files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
- $(LTGOCOMPILE) $(MATH_FLAG) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
+ $(LTGOCOMPILE) $(MATH_FLAG) -I . -c -fgo-pkgpath=math -o $@ $$files
math/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: math/check
-@go_include@ mime/mime.lo.dep
-mime/mime.lo.dep: $(go_mime_files)
+@go_include@ mime.lo.dep
+mime.lo.dep: $(go_mime_files)
$(BUILDDEPS)
-mime/mime.lo: $(go_mime_files)
+mime.lo: $(go_mime_files)
$(BUILDPACKAGE)
mime/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: mime/check
-@go_include@ net/net.lo.dep
-net/net.lo.dep: $(go_net_files)
+@go_include@ net.lo.dep
+net.lo.dep: $(go_net_files)
$(BUILDDEPS)
-net/net.lo: $(go_net_files)
+net.lo: $(go_net_files)
$(BUILDPACKAGE)
net/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: net/check
-@go_include@ os/os.lo.dep
-os/os.lo.dep: $(go_os_files)
+@go_include@ os.lo.dep
+os.lo.dep: $(go_os_files)
$(BUILDDEPS)
-os/os.lo: $(go_os_files)
+os.lo: $(go_os_files)
$(BUILDPACKAGE)
os/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: os/check
-@go_include@ path/path.lo.dep
-path/path.lo.dep: $(go_path_files)
+@go_include@ path.lo.dep
+path.lo.dep: $(go_path_files)
$(BUILDDEPS)
-path/path.lo: $(go_path_files)
+path.lo: $(go_path_files)
$(BUILDPACKAGE)
path/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: path/check
-@go_include@ reflect/reflect.lo.dep
-reflect/reflect.lo.dep: $(go_reflect_files)
+@go_include@ reflect-go.lo.dep
+reflect-go.lo.dep: $(go_reflect_files)
$(BUILDDEPS)
-reflect/reflect.lo: $(go_reflect_files)
+reflect-go.lo: $(go_reflect_files)
$(BUILDPACKAGE)
reflect/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: reflect/check
-@go_include@ regexp/regexp.lo.dep
-regexp/regexp.lo.dep: $(go_regexp_files)
+@go_include@ regexp.lo.dep
+regexp.lo.dep: $(go_regexp_files)
$(BUILDDEPS)
-regexp/regexp.lo: $(go_regexp_files)
+regexp.lo: $(go_regexp_files)
$(BUILDPACKAGE)
regexp/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: regexp/check
-@go_include@ runtime/runtime.lo.dep
-runtime/runtime.lo.dep: $(go_runtime_files)
+@go_include@ runtime-go.lo.dep
+runtime-go.lo.dep: $(go_runtime_files)
$(BUILDDEPS)
-runtime/runtime.lo: $(go_runtime_files)
+runtime-go.lo: $(go_runtime_files)
$(BUILDPACKAGE)
runtime/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: runtime/check
-@go_include@ text/scanner.lo.dep
-text/scanner.lo.dep: $(go_text_scanner_files)
- $(BUILDDEPS)
-text/scanner.lo: $(go_text_scanner_files)
- $(BUILDPACKAGE)
-text/scanner/check: $(CHECK_DEPS)
- @$(MKDIR_P) text/scanner
- @$(CHECK)
-.PHONY: text/scanner/check
-
-@go_include@ sort/sort.lo.dep
-sort/sort.lo.dep: $(go_sort_files)
+@go_include@ sort.lo.dep
+sort.lo.dep: $(go_sort_files)
$(BUILDDEPS)
-sort/sort.lo: $(go_sort_files)
+sort.lo: $(go_sort_files)
$(BUILDPACKAGE)
sort/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: sort/check
-@go_include@ strconv/strconv.lo.dep
-strconv/strconv.lo.dep: $(go_strconv_files)
+@go_include@ strconv.lo.dep
+strconv.lo.dep: $(go_strconv_files)
$(BUILDDEPS)
-strconv/strconv.lo: $(go_strconv_files)
+strconv.lo: $(go_strconv_files)
$(BUILDPACKAGE)
strconv/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: strconv/check
-@go_include@ strings/strings.lo.dep
-strings/strings.lo.dep: $(go_strings_files)
+@go_include@ strings.lo.dep
+strings.lo.dep: $(go_strings_files)
$(BUILDDEPS)
-strings/strings.lo: $(go_strings_files)
+strings.lo: $(go_strings_files)
$(BUILDPACKAGE)
strings/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: strings/check
-@go_include@ sync/sync.lo.dep
-sync/sync.lo.dep: $(go_sync_files)
+@go_include@ sync.lo.dep
+sync.lo.dep: $(go_sync_files)
$(BUILDDEPS)
-sync/sync.lo: $(go_sync_files)
+sync.lo: $(go_sync_files)
$(BUILDPACKAGE)
sync/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: sync/check
-@go_include@ testing/testing.lo.dep
-testing/testing.lo.dep: $(go_testing_files)
+@go_include@ testing.lo.dep
+testing.lo.dep: $(go_testing_files)
$(BUILDDEPS)
-testing/testing.lo: $(go_testing_files)
+testing.lo: $(go_testing_files)
$(BUILDPACKAGE)
testing/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: testing/check
-@go_include@ time/time.lo.dep
-time/time.lo.dep: $(go_time_files)
+@go_include@ time-go.lo.dep
+time-go.lo.dep: $(go_time_files)
$(BUILDDEPS)
-time/time.lo: $(go_time_files)
+time-go.lo: $(go_time_files)
$(BUILDPACKAGE)
time/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: time/check
-@go_include@ unicode/unicode.lo.dep
-unicode/unicode.lo.dep: $(go_unicode_files)
+@go_include@ unicode.lo.dep
+unicode.lo.dep: $(go_unicode_files)
$(BUILDDEPS)
-unicode/unicode.lo: $(go_unicode_files)
+unicode.lo: $(go_unicode_files)
$(BUILDPACKAGE)
unicode/check: $(CHECK_DEPS)
@$(CHECK)
@@ -5689,6 +5675,16 @@ sync/atomic/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: sync/atomic/check
+@go_include@ text/scanner.lo.dep
+text/scanner.lo.dep: $(go_text_scanner_files)
+ $(BUILDDEPS)
+text/scanner.lo: $(go_text_scanner_files)
+ $(BUILDPACKAGE)
+text/scanner/check: $(CHECK_DEPS)
+ @$(MKDIR_P) text/scanner
+ @$(CHECK)
+.PHONY: text/scanner/check
+
@go_include@ text/tabwriter.lo.dep
text/tabwriter.lo.dep: $(go_text_tabwriter_files)
$(BUILDDEPS)
@@ -5758,73 +5754,76 @@ unicode/utf8/check: $(CHECK_DEPS)
@$(CHECK)
.PHONY: unicode/utf8/check
-@go_include@ syscall/syscall.lo.dep
-syscall/syscall.lo.dep: $(go_syscall_files)
+@go_include@ syscall.lo.dep
+syscall.lo.dep: $(go_syscall_files)
$(BUILDDEPS)
-syscall/syscall.lo: $(go_syscall_files)
+syscall.lo: $(go_syscall_files)
$(BUILDPACKAGE)
syscall/errno.lo: go/syscall/errno.c
+ @$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $<
syscall/signame.lo: go/syscall/signame.c
+ @$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $<
syscall/wait.lo: go/syscall/wait.c
+ @$(MKDIR_P) syscall
$(LTCOMPILE) -c -o $@ $<
-bufio.gox: bufio/bufio.lo
+bufio.gox: bufio.lo
$(BUILDGOX)
-bytes.gox: bytes/bytes.lo
+bytes.gox: bytes.lo
$(BUILDGOX)
-crypto.gox: crypto/crypto.lo
+crypto.gox: crypto.lo
$(BUILDGOX)
-errors.gox: errors/errors.lo
+errors.gox: errors.lo
$(BUILDGOX)
-expvar.gox: expvar/expvar.lo
+expvar.gox: expvar.lo
$(BUILDGOX)
-flag.gox: flag/flag.lo
+flag.gox: flag.lo
$(BUILDGOX)
-fmt.gox: fmt/fmt.lo
+fmt.gox: fmt.lo
$(BUILDGOX)
-hash.gox: hash/hash.lo
+hash.gox: hash.lo
$(BUILDGOX)
-html.gox: html/html.lo
+html.gox: html.lo
$(BUILDGOX)
-image.gox: image/image.lo
+image.gox: image.lo
$(BUILDGOX)
-io.gox: io/io.lo
+io.gox: io.lo
$(BUILDGOX)
-log.gox: log/log.lo
+log.gox: log.lo
$(BUILDGOX)
-math.gox: math/math.lo
+math.gox: math.lo
$(BUILDGOX)
-mime.gox: mime/mime.lo
+mime.gox: mime.lo
$(BUILDGOX)
-net.gox: net/net.lo
+net.gox: net.lo
$(BUILDGOX)
-os.gox: os/os.lo
+os.gox: os.lo
$(BUILDGOX)
-path.gox: path/path.lo
+path.gox: path.lo
$(BUILDGOX)
-reflect.gox: reflect/reflect.lo
+reflect.gox: reflect-go.lo
$(BUILDGOX)
-regexp.gox: regexp/regexp.lo
+regexp.gox: regexp.lo
$(BUILDGOX)
-runtime.gox: runtime/runtime.lo
+runtime.gox: runtime-go.lo
$(BUILDGOX)
-sort.gox: sort/sort.lo
+sort.gox: sort.lo
$(BUILDGOX)
-strconv.gox: strconv/strconv.lo
+strconv.gox: strconv.lo
$(BUILDGOX)
-strings.gox: strings/strings.lo
+strings.gox: strings.lo
$(BUILDGOX)
-sync.gox: sync/sync.lo
+sync.gox: sync.lo
$(BUILDGOX)
-syscall.gox: syscall/syscall.lo
+syscall.gox: syscall.lo
$(BUILDGOX)
-testing.gox: testing/testing.lo
+testing.gox: testing.lo
$(BUILDGOX)
-time.gox: time/time.lo
+time.gox: time-go.lo
$(BUILDGOX)
-unicode.gox: unicode/unicode.lo
+unicode.gox: unicode.lo
$(BUILDGOX)
archive/tar.gox: archive/tar.lo
diff --git a/libgo/go/bytes/indexbyte.c b/libgo/go/bytes/indexbyte.c
index 8213b3e..8986d10 100644
--- a/libgo/go/bytes/indexbyte.c
+++ b/libgo/go/bytes/indexbyte.c
@@ -13,7 +13,7 @@
library function, which shouldn't need much stack space. */
int IndexByte (struct __go_open_array, char)
- asm ("libgo_bytes.bytes.IndexByte")
+ asm ("bytes.IndexByte")
__attribute__ ((no_split_stack));
int
@@ -30,7 +30,7 @@ IndexByte (struct __go_open_array s, char b)
/* Comparison. */
_Bool Equal (struct __go_open_array a, struct __go_open_array b)
- asm ("libgo_bytes.bytes.Equal")
+ asm ("bytes.Equal")
__attribute__ ((no_split_stack));
_Bool
diff --git a/libgo/go/encoding/xml/marshal_test.go b/libgo/go/encoding/xml/marshal_test.go
index b6978a1..6f0ecfc 100644
--- a/libgo/go/encoding/xml/marshal_test.go
+++ b/libgo/go/encoding/xml/marshal_test.go
@@ -726,7 +726,7 @@ var marshalErrorTests = []struct {
},
{
Value: map[*Ship]bool{nil: false},
- Err: "xml: unsupported type: map[*xml.Ship]bool",
+ Err: "xml: unsupported type: map[*encoding/xml.Ship]bool",
Kind: reflect.Map,
},
{
diff --git a/libgo/go/html/template/escape_test.go b/libgo/go/html/template/escape_test.go
index ce12c17..6670be9 100644
--- a/libgo/go/html/template/escape_test.go
+++ b/libgo/go/html/template/escape_test.go
@@ -226,7 +226,7 @@ func TestEscape(t *testing.T) {
{
"badMarshaler",
`<button onclick='alert(1/{{.B}}in numbers)'>`,
- `<button onclick='alert(1/ /* json: error calling MarshalJSON for type *template.badMarshaler: invalid character &#39;f&#39; looking for beginning of object key string */null in numbers)'>`,
+ `<button onclick='alert(1/ /* json: error calling MarshalJSON for type *html/template.badMarshaler: invalid character &#39;f&#39; looking for beginning of object key string */null in numbers)'>`,
},
{
"jsMarshaler",
diff --git a/libgo/go/reflect/all_test.go b/libgo/go/reflect/all_test.go
index c35dc26..e946c0a 100644
--- a/libgo/go/reflect/all_test.go
+++ b/libgo/go/reflect/all_test.go
@@ -1383,7 +1383,7 @@ func TestImportPath(t *testing.T) {
t Type
path string
}{
- {TypeOf(&base64.Encoding{}).Elem(), "libgo_encoding.base64"},
+ {TypeOf(&base64.Encoding{}).Elem(), "encoding/base64"},
{TypeOf(uint(0)), ""},
{TypeOf(map[string]int{}), ""},
{TypeOf((*error)(nil)).Elem(), ""},
diff --git a/libgo/go/regexp/all_test.go b/libgo/go/regexp/all_test.go
index f7b41a6..39a28df 100644
--- a/libgo/go/regexp/all_test.go
+++ b/libgo/go/regexp/all_test.go
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package regexp
+package regexp_test
import (
+ . "regexp"
"strings"
"testing"
)
diff --git a/libgo/go/regexp/exec_test.go b/libgo/go/regexp/exec_test.go
index e668574..a84bedc 100644
--- a/libgo/go/regexp/exec_test.go
+++ b/libgo/go/regexp/exec_test.go
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package regexp
+package regexp_test
import (
+ . "regexp"
+
"bufio"
"compress/bzip2"
"fmt"
@@ -219,22 +221,22 @@ var run = []func(*Regexp, *Regexp, string) ([]int, string){
}
func runFull(re, refull *Regexp, text string) ([]int, string) {
- refull.longest = false
+ refull.SetLongest(false)
return refull.FindStringSubmatchIndex(text), "[full]"
}
func runPartial(re, refull *Regexp, text string) ([]int, string) {
- re.longest = false
+ re.SetLongest(false)
return re.FindStringSubmatchIndex(text), ""
}
func runFullLongest(re, refull *Regexp, text string) ([]int, string) {
- refull.longest = true
+ refull.SetLongest(true)
return refull.FindStringSubmatchIndex(text), "[full,longest]"
}
func runPartialLongest(re, refull *Regexp, text string) ([]int, string) {
- re.longest = true
+ re.SetLongest(true)
return re.FindStringSubmatchIndex(text), "[longest]"
}
@@ -246,22 +248,22 @@ var match = []func(*Regexp, *Regexp, string) (bool, string){
}
func matchFull(re, refull *Regexp, text string) (bool, string) {
- refull.longest = false
+ refull.SetLongest(false)
return refull.MatchString(text), "[full]"
}
func matchPartial(re, refull *Regexp, text string) (bool, string) {
- re.longest = false
+ re.SetLongest(false)
return re.MatchString(text), ""
}
func matchFullLongest(re, refull *Regexp, text string) (bool, string) {
- refull.longest = true
+ refull.SetLongest(true)
return refull.MatchString(text), "[full,longest]"
}
func matchPartialLongest(re, refull *Regexp, text string) (bool, string) {
- re.longest = true
+ re.SetLongest(true)
return re.MatchString(text), "[longest]"
}
@@ -541,7 +543,7 @@ Reading:
}
}
- re, err := compile(pattern, syn, true)
+ re, err := CompileInternal(pattern, syn, true)
if err != nil {
if shouldCompile {
t.Errorf("%s:%d: %#q did not compile", file, lineno, pattern)
diff --git a/libgo/go/regexp/export_test.go b/libgo/go/regexp/export_test.go
new file mode 100644
index 0000000..25080ad
--- /dev/null
+++ b/libgo/go/regexp/export_test.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package regexp
+
+import "regexp/syntax"
+
+func (re *Regexp) SetLongest(b bool) {
+ re.longest = b
+}
+
+func CompileInternal(expr string, mode syntax.Flags, longest bool) (*Regexp, error) {
+ return compile(expr, mode, longest)
+}
diff --git a/libgo/go/regexp/find_test.go b/libgo/go/regexp/find_test.go
index e07eb7d..2593016 100644
--- a/libgo/go/regexp/find_test.go
+++ b/libgo/go/regexp/find_test.go
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package regexp
+package regexp_test
import (
+ . "regexp"
+
"fmt"
"strings"
"testing"
diff --git a/libgo/go/sync/atomic/atomic.c b/libgo/go/sync/atomic/atomic.c
index e5de5ee..14bc789 100644
--- a/libgo/go/sync/atomic/atomic.c
+++ b/libgo/go/sync/atomic/atomic.c
@@ -7,7 +7,7 @@
#include <stdint.h>
_Bool CompareAndSwapInt32 (int32_t *, int32_t, int32_t)
- asm ("libgo_sync.atomic.CompareAndSwapInt32");
+ asm ("sync_atomic.CompareAndSwapInt32");
_Bool
CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
@@ -16,7 +16,7 @@ CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
}
_Bool CompareAndSwapInt64 (int64_t *, int64_t, int64_t)
- asm ("libgo_sync.atomic.CompareAndSwapInt64");
+ asm ("sync_atomic.CompareAndSwapInt64");
_Bool
CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
@@ -25,7 +25,7 @@ CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
}
_Bool CompareAndSwapUint32 (uint32_t *, uint32_t, uint32_t)
- asm ("libgo_sync.atomic.CompareAndSwapUint32");
+ asm ("sync_atomic.CompareAndSwapUint32");
_Bool
CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
@@ -34,7 +34,7 @@ CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
}
_Bool CompareAndSwapUint64 (uint64_t *, uint64_t, uint64_t)
- asm ("libgo_sync.atomic.CompareAndSwapUint64");
+ asm ("sync_atomic.CompareAndSwapUint64");
_Bool
CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
@@ -43,7 +43,7 @@ CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
}
_Bool CompareAndSwapUintptr (uintptr_t *, uintptr_t, uintptr_t)
- asm ("libgo_sync.atomic.CompareAndSwapUintptr");
+ asm ("sync_atomic.CompareAndSwapUintptr");
_Bool
CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
@@ -52,7 +52,7 @@ CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
}
_Bool CompareAndSwapPointer (void **, void *, void *)
- asm ("libgo_sync.atomic.CompareAndSwapPointer");
+ asm ("sync_atomic.CompareAndSwapPointer");
_Bool
CompareAndSwapPointer (void **val, void *old, void *new)
@@ -61,7 +61,7 @@ CompareAndSwapPointer (void **val, void *old, void *new)
}
int32_t AddInt32 (int32_t *, int32_t)
- asm ("libgo_sync.atomic.AddInt32");
+ asm ("sync_atomic.AddInt32");
int32_t
AddInt32 (int32_t *val, int32_t delta)
@@ -70,7 +70,7 @@ AddInt32 (int32_t *val, int32_t delta)
}
uint32_t AddUint32 (uint32_t *, uint32_t)
- asm ("libgo_sync.atomic.AddUint32");
+ asm ("sync_atomic.AddUint32");
uint32_t
AddUint32 (uint32_t *val, uint32_t delta)
@@ -79,7 +79,7 @@ AddUint32 (uint32_t *val, uint32_t delta)
}
int64_t AddInt64 (int64_t *, int64_t)
- asm ("libgo_sync.atomic.AddInt64");
+ asm ("sync_atomic.AddInt64");
int64_t
AddInt64 (int64_t *val, int64_t delta)
@@ -88,7 +88,7 @@ AddInt64 (int64_t *val, int64_t delta)
}
uint64_t AddUint64 (uint64_t *, uint64_t)
- asm ("libgo_sync.atomic.AddUint64");
+ asm ("sync_atomic.AddUint64");
uint64_t
AddUint64 (uint64_t *val, uint64_t delta)
@@ -97,7 +97,7 @@ AddUint64 (uint64_t *val, uint64_t delta)
}
uintptr_t AddUintptr (uintptr_t *, uintptr_t)
- asm ("libgo_sync.atomic.AddUintptr");
+ asm ("sync_atomic.AddUintptr");
uintptr_t
AddUintptr (uintptr_t *val, uintptr_t delta)
@@ -106,7 +106,7 @@ AddUintptr (uintptr_t *val, uintptr_t delta)
}
int32_t LoadInt32 (int32_t *addr)
- asm ("libgo_sync.atomic.LoadInt32");
+ asm ("sync_atomic.LoadInt32");
int32_t
LoadInt32 (int32_t *addr)
@@ -120,7 +120,7 @@ LoadInt32 (int32_t *addr)
}
int64_t LoadInt64 (int64_t *addr)
- asm ("libgo_sync.atomic.LoadInt64");
+ asm ("sync_atomic.LoadInt64");
int64_t
LoadInt64 (int64_t *addr)
@@ -134,7 +134,7 @@ LoadInt64 (int64_t *addr)
}
uint32_t LoadUint32 (uint32_t *addr)
- asm ("libgo_sync.atomic.LoadUint32");
+ asm ("sync_atomic.LoadUint32");
uint32_t
LoadUint32 (uint32_t *addr)
@@ -148,7 +148,7 @@ LoadUint32 (uint32_t *addr)
}
uint64_t LoadUint64 (uint64_t *addr)
- asm ("libgo_sync.atomic.LoadUint64");
+ asm ("sync_atomic.LoadUint64");
uint64_t
LoadUint64 (uint64_t *addr)
@@ -162,7 +162,7 @@ LoadUint64 (uint64_t *addr)
}
uintptr_t LoadUintptr (uintptr_t *addr)
- asm ("libgo_sync.atomic.LoadUintptr");
+ asm ("sync_atomic.LoadUintptr");
uintptr_t
LoadUintptr (uintptr_t *addr)
@@ -176,7 +176,7 @@ LoadUintptr (uintptr_t *addr)
}
void *LoadPointer (void **addr)
- asm ("libgo_sync.atomic.LoadPointer");
+ asm ("sync_atomic.LoadPointer");
void *
LoadPointer (void **addr)
@@ -190,7 +190,7 @@ LoadPointer (void **addr)
}
void StoreInt32 (int32_t *addr, int32_t val)
- asm ("libgo_sync.atomic.StoreInt32");
+ asm ("sync_atomic.StoreInt32");
void
StoreInt32 (int32_t *addr, int32_t val)
@@ -203,7 +203,7 @@ StoreInt32 (int32_t *addr, int32_t val)
}
void StoreInt64 (int64_t *addr, int64_t val)
- asm ("libgo_sync.atomic.StoreInt64");
+ asm ("sync_atomic.StoreInt64");
void
StoreInt64 (int64_t *addr, int64_t val)
@@ -216,7 +216,7 @@ StoreInt64 (int64_t *addr, int64_t val)
}
void StoreUint32 (uint32_t *addr, uint32_t val)
- asm ("libgo_sync.atomic.StoreUint32");
+ asm ("sync_atomic.StoreUint32");
void
StoreUint32 (uint32_t *addr, uint32_t val)
@@ -229,7 +229,7 @@ StoreUint32 (uint32_t *addr, uint32_t val)
}
void StoreUint64 (uint64_t *addr, uint64_t val)
- asm ("libgo_sync.atomic.StoreUint64");
+ asm ("sync_atomic.StoreUint64");
void
StoreUint64 (uint64_t *addr, uint64_t val)
@@ -242,7 +242,7 @@ StoreUint64 (uint64_t *addr, uint64_t val)
}
void StoreUintptr (uintptr_t *addr, uintptr_t val)
- asm ("libgo_sync.atomic.StoreUintptr");
+ asm ("sync_atomic.StoreUintptr");
void
StoreUintptr (uintptr_t *addr, uintptr_t val)
@@ -255,7 +255,7 @@ StoreUintptr (uintptr_t *addr, uintptr_t val)
}
void StorePointer (void **addr, void *val)
- asm ("libgo_sync.atomic.StorePointer");
+ asm ("sync_atomic.StorePointer");
void
StorePointer (void **addr, void *val)
diff --git a/libgo/go/syscall/errno.c b/libgo/go/syscall/errno.c
index 8e57811..d01f4c9 100644
--- a/libgo/go/syscall/errno.c
+++ b/libgo/go/syscall/errno.c
@@ -10,8 +10,8 @@
/* errno is typically a macro. These functions set
and get errno specific to the libc being used. */
-uintptr_t GetErrno() asm ("libgo_syscall.syscall.GetErrno");
-void SetErrno(uintptr_t) asm ("libgo_syscall.syscall.SetErrno");
+uintptr_t GetErrno() asm ("syscall.GetErrno");
+void SetErrno(uintptr_t) asm ("syscall.SetErrno");
uintptr_t
GetErrno()
diff --git a/libgo/go/syscall/signame.c b/libgo/go/syscall/signame.c
index f2ff85a..6342288 100644
--- a/libgo/go/syscall/signame.c
+++ b/libgo/go/syscall/signame.c
@@ -11,7 +11,7 @@
#include "arch.h"
#include "malloc.h"
-String Signame (int sig) asm ("libgo_syscall.syscall.Signame");
+String Signame (int sig) asm ("syscall.Signame");
String
Signame (int sig)
diff --git a/libgo/go/syscall/wait.c b/libgo/go/syscall/wait.c
index fd7b65e..98ad245 100644
--- a/libgo/go/syscall/wait.c
+++ b/libgo/go/syscall/wait.c
@@ -11,7 +11,7 @@
#include <sys/wait.h>
extern _Bool Exited (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Exited.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Exited.N18_syscall.WaitStatus");
_Bool
Exited (uint32_t *w)
@@ -20,7 +20,7 @@ Exited (uint32_t *w)
}
extern _Bool Signaled (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Signaled.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Signaled.N18_syscall.WaitStatus");
_Bool
Signaled (uint32_t *w)
@@ -29,7 +29,7 @@ Signaled (uint32_t *w)
}
extern _Bool Stopped (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Stopped.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Stopped.N18_syscall.WaitStatus");
_Bool
Stopped (uint32_t *w)
@@ -38,7 +38,7 @@ Stopped (uint32_t *w)
}
extern _Bool Continued (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Continued.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Continued.N18_syscall.WaitStatus");
_Bool
Continued (uint32_t *w)
@@ -47,7 +47,7 @@ Continued (uint32_t *w)
}
extern _Bool CoreDump (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.CoreDump.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.CoreDump.N18_syscall.WaitStatus");
_Bool
CoreDump (uint32_t *w)
@@ -56,7 +56,7 @@ CoreDump (uint32_t *w)
}
extern int ExitStatus (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.ExitStatus.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.ExitStatus.N18_syscall.WaitStatus");
int
ExitStatus (uint32_t *w)
@@ -67,7 +67,7 @@ ExitStatus (uint32_t *w)
}
extern int Signal (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.Signal.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.Signal.N18_syscall.WaitStatus");
int
Signal (uint32_t *w)
@@ -78,7 +78,7 @@ Signal (uint32_t *w)
}
extern int StopSignal (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.StopSignal.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.StopSignal.N18_syscall.WaitStatus");
int
StopSignal (uint32_t *w)
@@ -89,7 +89,7 @@ StopSignal (uint32_t *w)
}
extern int TrapCause (uint32_t *w)
- __asm__ ("libgo_syscall.syscall.TrapCause.N32_libgo_syscall.syscall.WaitStatus");
+ __asm__ ("syscall.TrapCause.N18_syscall.WaitStatus");
int
TrapCause (uint32_t *w __attribute__ ((unused)))
diff --git a/libgo/runtime/chan.c b/libgo/runtime/chan.c
index db91d2c4..7cf307f 100644
--- a/libgo/runtime/chan.c
+++ b/libgo/runtime/chan.c
@@ -109,7 +109,7 @@ runtime_makechan_c(ChanType *t, int64 hint)
// For reflect
// func makechan(typ *ChanType, size uint32) (chan)
uintptr reflect_makechan(ChanType *, uint32)
- asm ("libgo_reflect.reflect.makechan");
+ asm ("reflect.makechan");
uintptr
reflect_makechan(ChanType *t, uint32 size)
@@ -568,7 +568,7 @@ runtime_selectnbrecv2(ChanType *t, byte *v, _Bool *received, Hchan *c)
// the actual data if it fits, or else a pointer to the data.
_Bool reflect_chansend(ChanType *, Hchan *, uintptr, _Bool)
- __asm__("libgo_reflect.reflect.chansend");
+ __asm__("reflect.chansend");
_Bool
reflect_chansend(ChanType *t, Hchan *c, uintptr val, _Bool nb)
@@ -605,7 +605,7 @@ struct chanrecv_ret
};
struct chanrecv_ret reflect_chanrecv(ChanType *, Hchan *, _Bool)
- __asm__("libgo_reflect.reflect.chanrecv");
+ __asm__("reflect.chanrecv");
struct chanrecv_ret
reflect_chanrecv(ChanType *t, Hchan *c, _Bool nb)
@@ -1161,7 +1161,7 @@ __go_builtin_close(Hchan *c)
// For reflect
// func chanclose(c chan)
-void reflect_chanclose(uintptr) __asm__("libgo_reflect.reflect.chanclose");
+void reflect_chanclose(uintptr) __asm__("reflect.chanclose");
void
reflect_chanclose(uintptr c)
@@ -1172,7 +1172,7 @@ reflect_chanclose(uintptr c)
// For reflect
// func chanlen(c chan) (len int32)
-int32 reflect_chanlen(uintptr) __asm__("libgo_reflect.reflect.chanlen");
+int32 reflect_chanlen(uintptr) __asm__("reflect.chanlen");
int32
reflect_chanlen(uintptr ca)
@@ -1197,7 +1197,7 @@ __go_chan_len(Hchan *c)
// For reflect
// func chancap(c chan) (cap int32)
-int32 reflect_chancap(uintptr) __asm__("libgo_reflect.reflect.chancap");
+int32 reflect_chancap(uintptr) __asm__("reflect.chancap");
int32
reflect_chancap(uintptr ca)
diff --git a/libgo/runtime/cpuprof.c b/libgo/runtime/cpuprof.c
index 5e3fc99..252948d 100644
--- a/libgo/runtime/cpuprof.c
+++ b/libgo/runtime/cpuprof.c
@@ -122,7 +122,7 @@ static void LostProfileData(void) {
}
extern void runtime_SetCPUProfileRate(int32)
- __asm__("libgo_runtime.runtime.SetCPUProfileRate");
+ __asm__("runtime.SetCPUProfileRate");
// SetCPUProfileRate sets the CPU profiling rate.
// The user documentation is in debug.go.
@@ -422,7 +422,7 @@ breakflush:
}
extern Slice runtime_CPUProfile(void)
- __asm__("libgo_runtime.runtime.CPUProfile");
+ __asm__("runtime.CPUProfile");
// CPUProfile returns the next cpu profile block as a []byte.
// The user documentation is in debug.go.
diff --git a/libgo/runtime/go-breakpoint.c b/libgo/runtime/go-breakpoint.c
index bb6eddc..5eebe18 100644
--- a/libgo/runtime/go-breakpoint.c
+++ b/libgo/runtime/go-breakpoint.c
@@ -6,7 +6,7 @@
#include <sched.h>
-void Breakpoint (void) asm ("libgo_runtime.runtime.Breakpoint");
+void Breakpoint (void) asm ("runtime.Breakpoint");
void
Breakpoint (void)
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c
index f2bebeb..dda3960 100644
--- a/libgo/runtime/go-caller.c
+++ b/libgo/runtime/go-caller.c
@@ -36,7 +36,7 @@ static symvalfn_type symvalfn;
function/file/line information. */
void RegisterDebugLookup (infofn_type, symvalfn_type)
- __asm__ ("libgo_runtime.runtime.RegisterDebugLookup");
+ __asm__ ("runtime.RegisterDebugLookup");
void
RegisterDebugLookup (infofn_type pi, symvalfn_type ps)
@@ -76,9 +76,9 @@ struct caller_ret
_Bool ok;
};
-struct caller_ret Caller (int n) asm ("libgo_runtime.runtime.Caller");
+struct caller_ret Caller (int n) asm ("runtime.Caller");
-Func *FuncForPC (uintptr_t) asm ("libgo_runtime.runtime.FuncForPC");
+Func *FuncForPC (uintptr_t) asm ("runtime.FuncForPC");
/* Implement runtime.Caller. */
@@ -132,7 +132,7 @@ struct funcline_go_return
struct funcline_go_return
runtime_funcline_go (Func *f, uintptr targetpc)
- __asm__ ("libgo_runtime.runtime.funcline_go");
+ __asm__ ("runtime.funcline_go");
struct funcline_go_return
runtime_funcline_go (Func *f __attribute__((unused)), uintptr targetpc)
diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c
index 09556c3..2d8fce7 100644
--- a/libgo/runtime/go-callers.c
+++ b/libgo/runtime/go-callers.c
@@ -67,7 +67,7 @@ runtime_callers (int32 skip, uintptr *pcbuf, int32 m)
}
int Callers (int, struct __go_open_array)
- __asm__ ("libgo_runtime.runtime.Callers");
+ __asm__ ("runtime.Callers");
int
Callers (int skip, struct __go_open_array pc)
diff --git a/libgo/runtime/go-getgoroot.c b/libgo/runtime/go-getgoroot.c
index e74fee8..1db4afe 100644
--- a/libgo/runtime/go-getgoroot.c
+++ b/libgo/runtime/go-getgoroot.c
@@ -8,7 +8,7 @@
#include "go-string.h"
-struct __go_string getgoroot (void) asm ("libgo_runtime.runtime.getgoroot");
+struct __go_string getgoroot (void) asm ("runtime.getgoroot");
struct __go_string
getgoroot ()
diff --git a/libgo/runtime/go-now.c b/libgo/runtime/go-now.c
index 5df8085..ede4493 100644
--- a/libgo/runtime/go-now.c
+++ b/libgo/runtime/go-now.c
@@ -15,7 +15,7 @@ struct time_now_ret
};
struct time_now_ret now()
- __asm__ ("libgo_time.time.now")
+ __asm__ ("time.now")
__attribute__ ((no_split_stack));
struct time_now_ret
diff --git a/libgo/runtime/go-reflect-map.c b/libgo/runtime/go-reflect-map.c
index c06aef1..7ef632c 100644
--- a/libgo/runtime/go-reflect-map.c
+++ b/libgo/runtime/go-reflect-map.c
@@ -24,7 +24,7 @@ struct mapaccess_ret
extern struct mapaccess_ret mapaccess (struct __go_map_type *, uintptr_t,
uintptr_t)
- asm ("libgo_reflect.reflect.mapaccess");
+ asm ("reflect.mapaccess");
struct mapaccess_ret
mapaccess (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i)
@@ -77,7 +77,7 @@ mapaccess (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i)
extern void mapassign (struct __go_map_type *, uintptr_t, uintptr_t,
uintptr_t, _Bool)
- asm ("libgo_reflect.reflect.mapassign");
+ asm ("reflect.mapassign");
void
mapassign (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i,
@@ -118,7 +118,7 @@ mapassign (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i,
}
extern int32_t maplen (uintptr_t)
- asm ("libgo_reflect.reflect.maplen");
+ asm ("reflect.maplen");
int32_t
maplen (uintptr_t m)
@@ -131,7 +131,7 @@ maplen (uintptr_t m)
}
extern unsigned char *mapiterinit (struct __go_map_type *, uintptr_t)
- asm ("libgo_reflect.reflect.mapiterinit");
+ asm ("reflect.mapiterinit");
unsigned char *
mapiterinit (struct __go_map_type *mt, uintptr_t m)
@@ -145,7 +145,7 @@ mapiterinit (struct __go_map_type *mt, uintptr_t m)
}
extern void mapiternext (unsigned char *)
- asm ("libgo_reflect.reflect.mapiternext");
+ asm ("reflect.mapiternext");
void
mapiternext (unsigned char *it)
@@ -160,7 +160,7 @@ struct mapiterkey_ret
};
extern struct mapiterkey_ret mapiterkey (unsigned char *)
- asm ("libgo_reflect.reflect.mapiterkey");
+ asm ("reflect.mapiterkey");
struct mapiterkey_ret
mapiterkey (unsigned char *ita)
@@ -203,7 +203,7 @@ mapiterkey (unsigned char *ita)
/* Make a new map. We have to build our own map descriptor. */
extern uintptr_t makemap (const struct __go_map_type *)
- asm ("libgo_reflect.reflect.makemap");
+ asm ("reflect.makemap");
uintptr_t
makemap (const struct __go_map_type *t)
diff --git a/libgo/runtime/go-setenv.c b/libgo/runtime/go-setenv.c
index a62796b..789ffdf 100644
--- a/libgo/runtime/go-setenv.c
+++ b/libgo/runtime/go-setenv.c
@@ -15,7 +15,7 @@
/* Set the C environment from Go. This is called by syscall.Setenv. */
void setenv_c (struct __go_string, struct __go_string)
- __asm__ ("libgo_syscall.syscall.setenv_c");
+ __asm__ ("syscall.setenv_c");
void
setenv_c (struct __go_string k, struct __go_string v)
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index b698ae2..abe78c4 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -408,7 +408,7 @@ runtime_setsig (int32 i, bool def __attribute__ ((unused)), bool restart)
/* Used by the os package to raise SIGPIPE. */
-void os_sigpipe (void) __asm__ ("libgo_os.os.sigpipe");
+void os_sigpipe (void) __asm__ ("os.sigpipe");
void
os_sigpipe (void)
diff --git a/libgo/runtime/go-typestring.c b/libgo/runtime/go-typestring.c
index dcbbc65..d40c6ad 100644
--- a/libgo/runtime/go-typestring.c
+++ b/libgo/runtime/go-typestring.c
@@ -9,7 +9,7 @@
#include "go-string.h"
struct __go_string typestring(struct __go_empty_interface)
- asm ("libgo_runtime.runtime.typestring");
+ asm ("runtime.typestring");
struct __go_string
typestring (struct __go_empty_interface e)
diff --git a/libgo/runtime/go-unsafe-new.c b/libgo/runtime/go-unsafe-new.c
index 2b9e044..a75c388 100644
--- a/libgo/runtime/go-unsafe-new.c
+++ b/libgo/runtime/go-unsafe-new.c
@@ -12,7 +12,7 @@
/* Implement unsafe_New, called from the reflect package. */
void *unsafe_New (struct __go_empty_interface type)
- asm ("libgo_reflect.reflect.unsafe_New");
+ asm ("reflect.unsafe_New");
/* The dynamic type of the argument will be a pointer to a type
descriptor. */
diff --git a/libgo/runtime/go-unsafe-newarray.c b/libgo/runtime/go-unsafe-newarray.c
index f4c5595..67399ea 100644
--- a/libgo/runtime/go-unsafe-newarray.c
+++ b/libgo/runtime/go-unsafe-newarray.c
@@ -12,7 +12,7 @@
/* Implement unsafe_NewArray, called from the reflect package. */
void *unsafe_NewArray (struct __go_empty_interface type, int n)
- asm ("libgo_reflect.reflect.unsafe_NewArray");
+ asm ("reflect.unsafe_NewArray");
/* The dynamic type of the argument will be a pointer to a type
descriptor. */
diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c
index 9ec1800..cda5936 100644
--- a/libgo/runtime/go-unsafe-pointer.c
+++ b/libgo/runtime/go-unsafe-pointer.c
@@ -15,7 +15,7 @@
descriptor. */
extern const struct __go_type_descriptor unsafe_Pointer
- asm ("__go_tdn_libgo_unsafe.unsafe.Pointer");
+ asm ("__go_tdn_unsafe.Pointer");
/* Used to determine the field alignment. */
struct field_align
@@ -61,7 +61,7 @@ const struct __go_type_descriptor unsafe_Pointer =
it to be defined elsewhere. */
extern const struct __go_ptr_type pointer_unsafe_Pointer
- asm ("__go_td_pN27_libgo_unsafe.unsafe.Pointer");
+ asm ("__go_td_pN14_unsafe.Pointer");
/* The reflection string. */
#define PREFLECTION "*unsafe.Pointer"
diff --git a/libgo/runtime/goc2c.c b/libgo/runtime/goc2c.c
index 93031ff..55c6d9b 100644
--- a/libgo/runtime/goc2c.c
+++ b/libgo/runtime/goc2c.c
@@ -33,6 +33,9 @@
/* Whether we're emitting for gcc */
static int gcc;
+/* Package path to use; only meaningful for gcc */
+static const char *pkgpath;
+
/* Package prefix to use; only meaningful for gcc */
static const char *prefix;
@@ -579,9 +582,13 @@ write_gcc_func_header(char *package, char *name, struct params *params,
first = 1;
write_params(params, &first);
printf(") asm (\"");
- if (prefix != NULL)
- printf("%s.", prefix);
- printf("%s.%s\");\n", package, name);
+ if (pkgpath != NULL)
+ printf("%s", pkgpath);
+ else if (prefix != NULL)
+ printf("%s.%s", prefix, package);
+ else
+ printf("%s", package);
+ printf(".%s\");\n", name);
write_gcc_return_type(package, name, rets);
printf(" %s_%s(", package, name);
first = 1;
@@ -724,7 +731,7 @@ process_file(void)
static void
usage(void)
{
- sysfatal("Usage: goc2c [--6g | --gc] [--go-prefix PREFIX] [file]\n");
+ sysfatal("Usage: goc2c [--6g | --gc] [--go-pkgpath PKGPATH] [--go-prefix PREFIX] [file]\n");
}
void
@@ -740,7 +747,11 @@ main(int argc, char **argv)
gcc = 0;
else if(strcmp(argv[1], "--gcc") == 0)
gcc = 1;
- else if (strcmp(argv[1], "--go-prefix") == 0 && argc > 2) {
+ else if (strcmp(argv[1], "--go-pkgpath") == 0 && argc > 2) {
+ pkgpath = argv[2];
+ argc--;
+ argv++;
+ } else if (strcmp(argv[1], "--go-prefix") == 0 && argc > 2) {
prefix = argv[2];
argc--;
argv++;
diff --git a/libgo/runtime/malloc.goc b/libgo/runtime/malloc.goc
index 253fdbe..ae5e15f 100644
--- a/libgo/runtime/malloc.goc
+++ b/libgo/runtime/malloc.goc
@@ -23,7 +23,7 @@ MHeap runtime_mheap;
extern MStats mstats; // defined in extern.go
extern volatile int32 runtime_MemProfileRate
- __asm__ ("libgo_runtime.runtime.MemProfileRate");
+ __asm__ ("runtime.MemProfileRate");
// Allocate an object of at least size bytes.
// Small objects are allocated from the per-thread cache's free lists.
@@ -266,7 +266,7 @@ runtime_purgecachedstats(M* m)
}
extern uintptr runtime_sizeof_C_MStats
- __asm__ ("libgo_runtime.runtime.Sizeof_C_MStats");
+ __asm__ ("runtime.Sizeof_C_MStats");
#define MaxArena32 (2U<<30)
diff --git a/libgo/runtime/malloc.h b/libgo/runtime/malloc.h
index 4cb07477..16bb449 100644
--- a/libgo/runtime/malloc.h
+++ b/libgo/runtime/malloc.h
@@ -237,7 +237,7 @@ struct MStats
};
extern MStats mstats
- __asm__ ("libgo_runtime.runtime.VmemStats");
+ __asm__ ("runtime.VmemStats");
// Size classes. Computed and initialized by InitSizes.
diff --git a/libgo/runtime/mgc0.c b/libgo/runtime/mgc0.c
index 7e68535..c08d5c1 100644
--- a/libgo/runtime/mgc0.c
+++ b/libgo/runtime/mgc0.c
@@ -1078,7 +1078,7 @@ runtime_gc(int32 force)
}
void runtime_ReadMemStats(MStats *)
- __asm__("libgo_runtime.runtime.ReadMemStats");
+ __asm__("runtime.ReadMemStats");
void
runtime_ReadMemStats(MStats *stats)
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 660c69f..eabd5e8 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -1300,7 +1300,7 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize)
/* For runtime package testing. */
void runtime_testing_entersyscall(void)
- __asm__("libgo_runtime.runtime.entersyscall");
+ __asm__("runtime.entersyscall");
void
runtime_testing_entersyscall()
@@ -1309,7 +1309,7 @@ runtime_testing_entersyscall()
}
void runtime_testing_exitsyscall(void)
- __asm__("libgo_runtime.runtime.exitsyscall");
+ __asm__("runtime.exitsyscall");
void
runtime_testing_exitsyscall()
@@ -1416,7 +1416,7 @@ rundefer(void)
}
}
-void runtime_Goexit (void) asm ("libgo_runtime.runtime.Goexit");
+void runtime_Goexit (void) asm ("runtime.Goexit");
void
runtime_Goexit(void)
@@ -1425,7 +1425,7 @@ runtime_Goexit(void)
runtime_goexit();
}
-void runtime_Gosched (void) asm ("libgo_runtime.runtime.Gosched");
+void runtime_Gosched (void) asm ("runtime.Gosched");
void
runtime_Gosched(void)
@@ -1504,7 +1504,7 @@ runtime_lockedOSThread(void)
// for testing of callbacks
_Bool runtime_golockedOSThread(void)
- asm("libgo_runtime.runtime.golockedOSThread");
+ asm("runtime.golockedOSThread");
_Bool
runtime_golockedOSThread(void)
@@ -1520,7 +1520,7 @@ runtime_mid()
}
int32 runtime_NumGoroutine (void)
- __asm__ ("libgo_runtime.runtime.NumGoroutine");
+ __asm__ ("runtime.NumGoroutine");
int32
runtime_NumGoroutine()
diff --git a/libgo/runtime/runtime.c b/libgo/runtime/runtime.c
index a0dbf80..c8443cb 100644
--- a/libgo/runtime/runtime.c
+++ b/libgo/runtime/runtime.c
@@ -86,8 +86,8 @@ runtime_panicstring(const char *s)
static int32 argc;
static byte** argv;
-extern Slice os_Args asm ("libgo_os.os.Args");
-extern Slice syscall_Envs asm ("libgo_syscall.syscall.Envs");
+extern Slice os_Args asm ("os.Args");
+extern Slice syscall_Envs asm ("syscall.Envs");
void
runtime_args(int32 c, byte **v)
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index d379f99..3e75b15 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -298,8 +298,8 @@ void runtime_gosched(void);
void runtime_tsleep(int64);
M* runtime_newm(void);
void runtime_goexit(void);
-void runtime_entersyscall(void) __asm__("libgo_syscall.syscall.Entersyscall");
-void runtime_exitsyscall(void) __asm__("libgo_syscall.syscall.Exitsyscall");
+void runtime_entersyscall(void) __asm__("syscall.Entersyscall");
+void runtime_exitsyscall(void) __asm__("syscall.Exitsyscall");
void siginit(void);
bool __go_sigsend(int32 sig);
int32 runtime_callers(int32, uintptr*, int32);
@@ -374,7 +374,7 @@ void runtime_panic(Eface);
struct __go_func_type;
void reflect_call(const struct __go_func_type *, const void *, _Bool, _Bool,
void **, void **)
- asm ("libgo_reflect.reflect.call");
+ asm ("reflect.call");
/* Functions. */
#define runtime_panic __go_panic
@@ -417,11 +417,11 @@ void runtime_usleep(uint32);
* runtime c-called (but written in Go)
*/
void runtime_printany(Eface)
- __asm__("libgo_runtime.runtime.Printany");
+ __asm__("runtime.Printany");
void runtime_newTypeAssertionError(const String*, const String*, const String*, const String*, Eface*)
- __asm__("libgo_runtime.runtime.NewTypeAssertionError");
+ __asm__("runtime.NewTypeAssertionError");
void runtime_newErrorString(String, Eface*)
- __asm__("libgo_runtime.runtime.NewErrorString");
+ __asm__("runtime.NewErrorString");
/*
* wrapped for go users
@@ -431,8 +431,8 @@ void runtime_semrelease(uint32 volatile *);
int32 runtime_gomaxprocsfunc(int32 n);
void runtime_procyield(uint32);
void runtime_osyield(void);
-void runtime_LockOSThread(void) __asm__("libgo_runtime.runtime.LockOSThread");
-void runtime_UnlockOSThread(void) __asm__("libgo_runtime.runtime.UnlockOSThread");
+void runtime_LockOSThread(void) __asm__("runtime.LockOSThread");
+void runtime_UnlockOSThread(void) __asm__("runtime.UnlockOSThread");
uintptr runtime_memlimit(void);
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 40d32ed..da1162e 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -30,6 +30,7 @@ gofiles=""
pkgfiles=""
loop=true
keep=false
+pkgpath=
prefix=
dejagnu=no
GOARCH=""
@@ -56,6 +57,15 @@ while $loop; do
basedir=`echo $1 | sed -e 's/^--basedir=//'`
shift
;;
+ x--pkgpath)
+ pkgpath=$2
+ shift
+ shift
+ ;;
+ x--pkgpath=*)
+ pkgpath=`echo $1 | sed -e 's/^--pkgpath=//'`
+ shift
+ ;;
x--prefix)
prefix=$2
shift
@@ -310,23 +320,28 @@ set -e
package=`echo ${srcdir} | sed -e 's|^.*libgo/go/||'`
+pkgpatharg=
+xpkgpatharg=
prefixarg=
-if test -n "$prefix"; then
+if test -n "$pkgpath"; then
+ pkgpatharg="-fgo-pkgpath=$pkgpath"
+ xpkgpatharg="-fgo-pkgpath=${pkgpath}_test"
+elif test -n "$prefix"; then
prefixarg="-fgo-prefix=$prefix"
fi
if test "$trace" = "true"; then
- echo $GC -g $prefixarg -c -I . -fno-toplevel-reorder -o _gotest_.o $gofiles $pkgbasefiles
+ echo $GC -g $pkgpatharg $prefixarg -c -I . -fno-toplevel-reorder -o _gotest_.o $gofiles $pkgbasefiles
fi
-$GC -g $prefixarg -c -I . -fno-toplevel-reorder -o _gotest_.o $gofiles $pkgbasefiles
+$GC -g $pkgpatharg $prefixarg -c -I . -fno-toplevel-reorder -o _gotest_.o $gofiles $pkgbasefiles
if $havex; then
mkdir -p `dirname $package`
cp _gotest_.o `dirname $package`/lib`basename $package`.a
if test "$trace" = "true"; then
- echo $GC -g -c -I . -fno-toplevel-reorder -o $xofile $xgofiles
+ echo $GC -g $xpkgpatharg -c -I . -fno-toplevel-reorder -o $xofile $xgofiles
fi
- $GC -g -c -I . -fno-toplevel-reorder -o $xofile $xgofiles
+ $GC -g $xpkgpatharg -c -I . -fno-toplevel-reorder -o $xofile $xgofiles
fi
# They all compile; now generate the code to call them.
@@ -343,24 +358,26 @@ localname() {
ppc*) text="D" ;;
esac
+ symtogo='sed -e s/_test/XXXtest/ -e s/.*_\([^_]*\.\)/\1/ -e s/XXXtest/_test/'
+
# test functions are named TestFoo
# the grep -v eliminates methods and other special names
# that have multiple dots.
pattern='Test([^a-z].*)?'
# The -p option tells GNU nm not to sort.
# The -v option tells Solaris nm to sort by value.
- tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
+ tests=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo)
if [ "x$tests" = x ]; then
echo 'gotest: warning: no tests matching '$pattern in _gotest_.o $xofile 1>&2
exit 2
fi
# benchmarks are named BenchmarkFoo.
pattern='Benchmark([^a-z].*)?'
- benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $test .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
+ benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $test .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo)
# examples are named ExampleFoo
pattern='Example([^a-z].*)?'
- examples=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
+ examples=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo)
# package spec
echo 'package main'