Commit f3ab5720 by Ian Lance Taylor

libgo: Use -fgo-pkgpath.

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