2012-03-27 23:13:14 +00:00
# Makefile.am -- Go library Makefile.
# Copyright 2009 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.
# Process this file with autoreconf to produce Makefile.in.
# Go support.
SUFFIXES = .c .go .gox .o .obj .lo .a
i f L I B G O _ I S _ R T E M S
subdirs = testsuite
e n d i f
2019-06-02 15:48:37 +00:00
i f L I B G O _ I S _ D A R W I N
GO_EXPORT_SECTION_NAME = __GNU_GO.__go_export
e l s e
GO_EXPORT_SECTION_NAME = .go_export
e n d i f
2012-03-27 23:13:14 +00:00
SUBDIRS = ${ subdirs }
2015-08-28 15:33:40 +00:00
gcc_version := $( shell $( GOC) -dumpversion)
2012-03-27 23:13:14 +00:00
MAINT_CHARSET = latin1
mkinstalldirs = $( SHELL) $( toplevel_srcdir) /mkinstalldirs
PWD_COMMAND = $$ { PWDCMD-pwd}
STAMP = echo timestamp >
toolexecdir = $( glibgo_toolexecdir)
toolexeclibdir = $( glibgo_toolexeclibdir)
toolexeclibgodir = $( nover_glibgo_toolexeclibdir) /go/$( gcc_version) /$( target_alias)
2015-08-28 15:33:40 +00:00
libexecsubdir = $( libexecdir) /gcc/$( target_alias) /$( gcc_version)
2012-03-27 23:13:14 +00:00
LIBFFI = @LIBFFI@
LIBFFIINCS = @LIBFFIINCS@
2015-08-28 15:33:40 +00:00
LIBATOMIC = @LIBATOMIC@
2012-03-27 23:13:14 +00:00
WARN_CFLAGS = $( WARN_FLAGS) $( WERROR)
# -I/-D flags to pass when compiling.
AM_CPPFLAGS = -I $( srcdir) /runtime $( LIBFFIINCS) $( PTHREAD_CFLAGS)
ACLOCAL_AMFLAGS = -I ./config -I ../config
2018-12-28 15:30:48 +00:00
AM_CFLAGS = -fexceptions -fnon-call-exceptions \
2014-09-21 17:33:12 +00:00
$( SPLIT_STACK) $( WARN_CFLAGS) \
2017-10-07 00:16:47 +00:00
$( STRINGOPS_FLAG) $( HWCAP_CFLAGS) $( OSCFLAGS) \
2014-09-21 17:33:12 +00:00
-I $( srcdir) /../libgcc -I $( srcdir) /../libbacktrace \
-I $( MULTIBUILDTOP) ../../gcc/include
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
AM_LDFLAGS =
2012-03-27 23:13:14 +00:00
i f U S I N G _ S P L I T _ S T A C K
2018-12-28 15:30:48 +00:00
AM_LDFLAGS += -XCClinker $( SPLIT_STACK)
e n d i f
i f L I B G O _ I S _ A I X
# Using an import file for libgo avoid requiring to use the -brtl flag
# when builing a go program
AM_LDFLAGS += -Wl,-bbigtoc -Wl,-bI:$( srcdir) /libgo.imp
EXTRA_libgo_la_DEPENDENCIES = libgo.imp
2012-03-27 23:13:14 +00:00
e n d i f
# Multilib support.
MAKEOVERRIDES =
# Work around what appears to be a GNU make handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
" AR_FLAGS= $( AR_FLAGS) " \
" CC_FOR_BUILD= $( CC_FOR_BUILD) " \
" CC_FOR_TARGET= $( CC_FOR_TARGET) " \
" CFLAGS= $( CFLAGS) " \
" CXXFLAGS= $( CXXFLAGS) " \
" CFLAGS_FOR_BUILD= $( CFLAGS_FOR_BUILD) " \
" CFLAGS_FOR_TARGET= $( CFLAGS_FOR_TARGET) " \
" GOC_FOR_TARGET= $( GOC_FOR_TARGET) " \
" GOC= $( GOC) " \
" GOCFLAGS= $( GOCFLAGS) " \
" INSTALL= $( INSTALL) " \
" INSTALL_DATA= $( INSTALL_DATA) " \
" INSTALL_PROGRAM= $( INSTALL_PROGRAM) " \
" INSTALL_SCRIPT= $( INSTALL_SCRIPT) " \
" LDFLAGS= $( LDFLAGS) " \
" LIBCFLAGS= $( LIBCFLAGS) " \
" LIBCFLAGS_FOR_TARGET= $( LIBCFLAGS_FOR_TARGET) " \
" MAKE= $( MAKE) " \
" MAKEINFO= $( MAKEINFO) $( MAKEINFOFLAGS) " \
" PICFLAG= $( PICFLAG) " \
" PICFLAG_FOR_TARGET= $( PICFLAG_FOR_TARGET) " \
" SHELL= $( SHELL) " \
" RUNTESTFLAGS= $( RUNTESTFLAGS) " \
" exec_prefix= $( exec_prefix) " \
" infodir= $( infodir) " \
" libdir= $( libdir) " \
" includedir= $( includedir) " \
" prefix= $( prefix) " \
" tooldir= $( tooldir) " \
" gxx_include_dir= $( gxx_include_dir) " \
" AR= $( AR) " \
" AS= $( AS) " \
" LD= $( LD) " \
" RANLIB= $( RANLIB) " \
" NM= $( NM) " \
" NM_FOR_BUILD= $( NM_FOR_BUILD) " \
" NM_FOR_TARGET= $( NM_FOR_TARGET) " \
" DESTDIR= $( DESTDIR) " \
" WERROR= $( WERROR) "
# Subdir rules rely on $(FLAGS_TO_PASS)
FLAGS_TO_PASS = $( AM_MAKEFLAGS)
2015-08-28 15:33:40 +00:00
i f G O C _ I S _ L L G O
toolexeclib_LTLIBRARIES = libgo-llgo.la
toolexeclib_LIBRARIES = libgobegin-llgo.a
e l s e
2012-03-27 23:13:14 +00:00
toolexeclib_LTLIBRARIES = libgo.la
2017-10-07 00:16:47 +00:00
toolexeclib_LIBRARIES = libgobegin.a libgolibbegin.a
2015-08-28 15:33:40 +00:00
e n d i f
2012-03-27 23:13:14 +00:00
2018-12-28 15:30:48 +00:00
noinst_LIBRARIES = libgotool.a
2012-03-27 23:13:14 +00:00
toolexeclibgo_DATA = \
bufio.gox \
bytes.gox \
2017-10-07 00:16:47 +00:00
context.gox \
2012-03-27 23:13:14 +00:00
crypto.gox \
2022-10-27 18:55:19 +00:00
embed.gox \
2014-09-21 17:33:12 +00:00
encoding.gox \
2012-03-27 23:13:14 +00:00
errors.gox \
expvar.gox \
flag.gox \
fmt.gox \
hash.gox \
html.gox \
image.gox \
io.gox \
log.gox \
math.gox \
mime.gox \
net.gox \
os.gox \
path.gox \
reflect.gox \
regexp.gox \
runtime.gox \
sort.gox \
strconv.gox \
strings.gox \
sync.gox \
syscall.gox \
testing.gox \
time.gox \
unicode.gox
toolexeclibgoarchivedir = $( toolexeclibgodir) /archive
toolexeclibgoarchive_DATA = \
archive/tar.gox \
archive/zip.gox
toolexeclibgocompressdir = $( toolexeclibgodir) /compress
toolexeclibgocompress_DATA = \
compress/bzip2.gox \
compress/flate.gox \
compress/gzip.gox \
compress/lzw.gox \
compress/zlib.gox
toolexeclibgocontainerdir = $( toolexeclibgodir) /container
toolexeclibgocontainer_DATA = \
container/heap.gox \
container/list.gox \
container/ring.gox
toolexeclibgocryptodir = $( toolexeclibgodir) /crypto
toolexeclibgocrypto_DATA = \
crypto/aes.gox \
crypto/cipher.gox \
crypto/des.gox \
crypto/dsa.gox \
crypto/ecdsa.gox \
2022-10-27 18:55:19 +00:00
crypto/ed25519.gox \
2012-03-27 23:13:14 +00:00
crypto/elliptic.gox \
crypto/hmac.gox \
crypto/md5.gox \
crypto/rand.gox \
crypto/rc4.gox \
crypto/rsa.gox \
crypto/sha1.gox \
crypto/sha256.gox \
crypto/sha512.gox \
crypto/subtle.gox \
crypto/tls.gox \
crypto/x509.gox
toolexeclibgocryptox509dir = $( toolexeclibgocryptodir) /x509
toolexeclibgocryptox509_DATA = \
crypto/x509/pkix.gox
toolexeclibgodatabasedir = $( toolexeclibgodir) /database
toolexeclibgodatabase_DATA = \
database/sql.gox
toolexeclibgodatabasesqldir = $( toolexeclibgodatabasedir) /sql
toolexeclibgodatabasesql_DATA = \
database/sql/driver.gox
toolexeclibgodebugdir = $( toolexeclibgodir) /debug
toolexeclibgodebug_DATA = \
2022-10-27 18:55:19 +00:00
debug/buildinfo.gox \
2012-03-27 23:13:14 +00:00
debug/dwarf.gox \
debug/elf.gox \
debug/gosym.gox \
debug/macho.gox \
2015-08-28 15:33:40 +00:00
debug/pe.gox \
2019-06-02 15:48:37 +00:00
debug/plan9obj.gox
2012-03-27 23:13:14 +00:00
toolexeclibgoencodingdir = $( toolexeclibgodir) /encoding
toolexeclibgoencoding_DATA = \
encoding/ascii85.gox \
encoding/asn1.gox \
encoding/base32.gox \
encoding/base64.gox \
encoding/binary.gox \
encoding/csv.gox \
encoding/gob.gox \
encoding/hex.gox \
encoding/json.gox \
encoding/pem.gox \
encoding/xml.gox
toolexeclibgogodir = $( toolexeclibgodir) /go
toolexeclibgogo_DATA = \
go/ast.gox \
go/build.gox \
2017-04-10 11:32:00 +00:00
go/constant.gox \
2012-03-27 23:13:14 +00:00
go/doc.gox \
2014-09-21 17:33:12 +00:00
go/format.gox \
2017-04-10 11:32:00 +00:00
go/importer.gox \
2012-03-27 23:13:14 +00:00
go/parser.gox \
go/printer.gox \
go/scanner.gox \
2017-04-10 11:32:00 +00:00
go/token.gox \
go/types.gox
2012-03-27 23:13:14 +00:00
2022-10-27 18:55:19 +00:00
toolexeclibgogobuilddir = $( toolexeclibgogodir) /build
toolexeclibgogobuild_DATA = \
go/build/constraint.gox
2012-03-27 23:13:14 +00:00
toolexeclibgohashdir = $( toolexeclibgodir) /hash
toolexeclibgohash_DATA = \
hash/adler32.gox \
hash/crc32.gox \
hash/crc64.gox \
2022-10-27 18:55:19 +00:00
hash/fnv.gox \
hash/maphash.gox
2012-03-27 23:13:14 +00:00
toolexeclibgohtmldir = $( toolexeclibgodir) /html
toolexeclibgohtml_DATA = \
html/template.gox
toolexeclibgoimagedir = $( toolexeclibgodir) /image
toolexeclibgoimage_DATA = \
image/color.gox \
image/draw.gox \
image/gif.gox \
image/jpeg.gox \
image/png.gox
2014-09-21 17:33:12 +00:00
toolexeclibgoimagecolordir = $( toolexeclibgoimagedir) /color
toolexeclibgoimagecolor_DATA = \
image/color/palette.gox
2012-03-27 23:13:14 +00:00
toolexeclibgoindexdir = $( toolexeclibgodir) /index
toolexeclibgoindex_DATA = \
index/suffixarray.gox
toolexeclibgoiodir = $( toolexeclibgodir) /io
toolexeclibgoio_DATA = \
2022-10-27 18:55:19 +00:00
io/fs.gox \
2012-03-27 23:13:14 +00:00
io/ioutil.gox
toolexeclibgologdir = $( toolexeclibgodir) /log
toolexeclibgolog_DATA = \
log/syslog.gox
toolexeclibgomathdir = $( toolexeclibgodir) /math
toolexeclibgomath_DATA = \
math/big.gox \
2018-12-28 15:30:48 +00:00
math/bits.gox \
2012-03-27 23:13:14 +00:00
math/cmplx.gox \
math/rand.gox
toolexeclibgomimedir = $( toolexeclibgodir) /mime
toolexeclibgomime_DATA = \
2017-04-10 11:32:00 +00:00
mime/multipart.gox \
mime/quotedprintable.gox
2012-03-27 23:13:14 +00:00
toolexeclibgonetdir = $( toolexeclibgodir) /net
toolexeclibgonet_DATA = \
net/http.gox \
net/mail.gox \
2022-10-27 18:55:19 +00:00
net/netip.gox \
2012-03-27 23:13:14 +00:00
net/rpc.gox \
net/smtp.gox \
net/textproto.gox \
net/url.gox
toolexeclibgonethttpdir = $( toolexeclibgonetdir) /http
toolexeclibgonethttp_DATA = \
net/http/cgi.gox \
2014-09-21 17:33:12 +00:00
net/http/cookiejar.gox \
2012-03-27 23:13:14 +00:00
net/http/fcgi.gox \
net/http/httptest.gox \
2017-10-07 00:16:47 +00:00
net/http/httptrace.gox \
2012-03-27 23:13:14 +00:00
net/http/httputil.gox \
net/http/pprof.gox
toolexeclibgonetrpcdir = $( toolexeclibgonetdir) /rpc
toolexeclibgonetrpc_DATA = \
net/rpc/jsonrpc.gox
toolexeclibgoosdir = $( toolexeclibgodir) /os
toolexeclibgoos_DATA = \
os/exec.gox \
os/signal.gox \
os/user.gox
toolexeclibgopathdir = $( toolexeclibgodir) /path
toolexeclibgopath_DATA = \
path/filepath.gox
toolexeclibgoregexpdir = $( toolexeclibgodir) /regexp
toolexeclibgoregexp_DATA = \
regexp/syntax.gox
toolexeclibgoruntimedir = $( toolexeclibgodir) /runtime
toolexeclibgoruntime_DATA = \
2022-10-27 18:55:19 +00:00
runtime/cgo.gox \
2012-03-27 23:13:14 +00:00
runtime/debug.gox \
2022-10-27 18:55:19 +00:00
runtime/metrics.gox \
2017-10-07 00:16:47 +00:00
runtime/pprof.gox \
runtime/trace.gox
2012-03-27 23:13:14 +00:00
toolexeclibgosyncdir = $( toolexeclibgodir) /sync
toolexeclibgosync_DATA = \
sync/atomic.gox
toolexeclibgotestingdir = $( toolexeclibgodir) /testing
toolexeclibgotesting_DATA = \
2022-10-27 18:55:19 +00:00
testing/fstest.gox \
2012-03-27 23:13:14 +00:00
testing/iotest.gox \
testing/quick.gox
2017-10-07 00:16:47 +00:00
toolexeclibgotestinginternaldir = $( toolexeclibgotestingdir) /internal
toolexeclibgotestinginternal_DATA = \
testing/internal/testdeps.gox
2012-03-27 23:13:14 +00:00
toolexeclibgotextdir = $( toolexeclibgodir) /text
toolexeclibgotext_DATA = \
text/scanner.gox \
text/tabwriter.gox \
text/template.gox
toolexeclibgotexttemplatedir = $( toolexeclibgotextdir) /template
toolexeclibgotexttemplate_DATA = \
text/template/parse.gox
2022-10-27 18:55:19 +00:00
toolexeclibgotimedir = $( toolexeclibgodir) /time
toolexeclibgotime_DATA = \
time/tzdata.gox
2012-03-27 23:13:14 +00:00
toolexeclibgounicodedir = $( toolexeclibgodir) /unicode
toolexeclibgounicode_DATA = \
unicode/utf16.gox \
unicode/utf8.gox
2022-10-27 18:55:19 +00:00
# Some internal packages are needed to bootstrap the gc toolchain.
toolexeclibgointernaldir = $( toolexeclibgodir) /internal
toolexeclibgointernal_DATA = \
internal/reflectlite.gox \
internal/unsafeheader.gox
2018-12-28 15:30:48 +00:00
# Some packages are only needed for tests, so unlike the other
# internal packages nothing will explicitly depend on them.
# Force them to be built.
noinst_DATA = \
2022-10-27 18:55:19 +00:00
golang.org/x/net/nettest.gox \
internal/cfg.gox \
internal/obscuretestdata.gox \
internal/profile.gox \
2018-12-28 15:30:48 +00:00
internal/testenv.gox \
internal/trace.gox \
net/internal/socktest.gox \
2022-10-27 18:55:19 +00:00
os/exec/internal/fdtest.gox \
2018-12-28 15:30:48 +00:00
os/signal/internal/pty.gox \
2022-10-27 18:55:19 +00:00
reflect/internal/example1.gox \
reflect/internal/example2.gox
2012-03-27 23:13:14 +00:00
i f L I B G O _ I S _ R T E M S
rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
e l s e
rtems_task_variable_add_file =
e n d i f
2022-10-27 18:55:19 +00:00
runtime_context_asm_file =
i f L I B G O _ I S _ X 8 6
2014-09-21 17:33:12 +00:00
i f L I B G O _ I S _ L I N U X
2022-10-27 18:55:19 +00:00
runtime_context_asm_file += runtime/go-context.S
2018-12-28 15:30:48 +00:00
e n d i f
2019-06-02 15:48:37 +00:00
e n d i f
2014-09-21 17:33:12 +00:00
2012-03-27 23:13:14 +00:00
runtime_files = \
2017-10-07 00:16:47 +00:00
runtime/aeshash.c \
2012-03-27 23:13:14 +00:00
runtime/go-assert.c \
runtime/go-caller.c \
runtime/go-callers.c \
runtime/go-cgo.c \
runtime/go-construct-map.c \
2015-08-28 15:33:40 +00:00
runtime/go-ffi.c \
2014-09-21 17:33:12 +00:00
runtime/go-fieldtrack.c \
2012-03-27 23:13:14 +00:00
runtime/go-matherr.c \
2017-10-07 00:16:47 +00:00
runtime/go-memclr.c \
runtime/go-memmove.c \
2022-10-27 18:55:19 +00:00
runtime/go-memequal.c \
2012-03-27 23:13:14 +00:00
runtime/go-nanotime.c \
runtime/go-now.c \
runtime/go-nosys.c \
runtime/go-reflect-call.c \
runtime/go-setenv.c \
runtime/go-signal.c \
runtime/go-unsafe-pointer.c \
2015-08-28 15:33:40 +00:00
runtime/go-unsetenv.c \
2012-03-27 23:13:14 +00:00
runtime/go-unwind.c \
2014-09-21 17:33:12 +00:00
runtime/go-varargs.c \
runtime/env_posix.c \
runtime/panic.c \
runtime/print.c \
2012-03-27 23:13:14 +00:00
runtime/proc.c \
2017-10-07 00:16:47 +00:00
runtime/runtime_c.c \
2018-12-28 15:30:48 +00:00
runtime/stack.c \
2012-03-27 23:13:14 +00:00
runtime/yield.c \
2022-10-27 18:55:19 +00:00
$( runtime_context_asm_file) \
$( rtems_task_variable_add_file)
2012-03-27 23:13:14 +00:00
version.go : s -version ; @true
s-version : Makefile
rm -f version.go.tmp
2017-10-07 00:16:47 +00:00
echo "package sys" > version.go.tmp
echo 'const GccgoToolDir = "$(libexecsubdir)"' >> version.go.tmp
2022-10-27 18:55:19 +00:00
echo 'const StackGuardMultiplierDefault = 1' >> version.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh version.go.tmp version.go
$( STAMP) $@
zgoarch.go : s -zgoarch ; @true
s-zgoarch : Makefile goarch .sh
rm -f zgoarch.go.tmp
echo "package goarch" > zgoarch.go.tmp
echo >> zgoarch.go.tmp
echo 'const GOARCH = "' $( GOARCH) '"' >> zgoarch.go.tmp
echo >> zgoarch.go.tmp
echo 'const (' >> zgoarch.go.tmp
echo " _ArchFamily = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) family` " >> zgoarch.go.tmp
echo " _BigEndian = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) bigendian` " >> zgoarch.go.tmp
echo " _DefaultPhysPageSize = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) defaultphyspagesize` " >> zgoarch.go.tmp
echo " _Int64Align = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) int64align` " >> zgoarch.go.tmp
echo " _MinFrameSize = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) minframesize` " >> zgoarch.go.tmp
echo " _PCQuantum = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) pcquantum` " >> zgoarch.go.tmp
echo " _StackAlign = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) stackalign` " >> zgoarch.go.tmp
echo ")" >> zgoarch.go.tmp
echo >> zgoarch.go.tmp
echo "const (" >> zgoarch.go.tmp
echo " UNKNOWN ArchFamilyType = iota" >> zgoarch.go.tmp
2017-10-07 00:16:47 +00:00
for a in $( ALLGOARCHFAMILY) ; do \
2022-10-27 18:55:19 +00:00
echo " $$ {a} " >> zgoarch.go.tmp; \
2017-10-07 00:16:47 +00:00
done
2022-10-27 18:55:19 +00:00
echo ")" >> zgoarch.go.tmp
echo >> zgoarch.go.tmp
2017-10-07 00:16:47 +00:00
for a in $( ALLGOARCH) ; do \
f = ` echo $$ { a} | sed -e 's/\(.\).*/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' ` ; \
n = " $$ {f}`echo $$ {a} | sed -e 's/.//'` " ; \
if test " $$ {a} " = " $( GOARCH) " ; then \
2022-10-27 18:55:19 +00:00
echo " const Is $$ {n} = 1 " >> zgoarch.go.tmp; \
2017-10-07 00:16:47 +00:00
else \
2022-10-27 18:55:19 +00:00
echo " const Is $$ {n} = 0 " >> zgoarch.go.tmp; \
2017-10-07 00:16:47 +00:00
fi ; \
done
2022-10-27 18:55:19 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh zgoarch.go.tmp zgoarch.go
$( STAMP) $@
zgoos.go : s -zgoos ; @true
s-zgoos : Makefile
rm -f zgoos.go.tmp
echo "package goos" > zgoos.go.tmp
echo >> zgoos.go.tmp
echo 'const GOOS = "' $( GOOS) '"' >> zgoos.go.tmp
echo >> zgoos.go.tmp
2017-10-07 00:16:47 +00:00
for a in $( ALLGOOS) ; do \
f = ` echo $$ { a} | sed -e 's/\(.\).*/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' ` ; \
n = " $$ {f}`echo $$ {a} | sed -e 's/.//'` " ; \
if test " $$ {a} " = " $( GOOS) " ; then \
2022-10-27 18:55:19 +00:00
echo " const Is $$ {n} = 1 " >> zgoos.go.tmp; \
2017-10-07 00:16:47 +00:00
else \
2022-10-27 18:55:19 +00:00
echo " const Is $$ {n} = 0 " >> zgoos.go.tmp; \
2017-10-07 00:16:47 +00:00
fi ; \
done
2022-10-27 18:55:19 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh zgoos.go.tmp zgoos.go
2015-08-28 15:33:40 +00:00
$( STAMP) $@
2019-06-02 15:48:37 +00:00
cpugen.go : s -cpu ; @true
2022-10-27 18:55:19 +00:00
s-cpu : Makefile goarch .sh
2019-06-02 15:48:37 +00:00
rm -f cpugen.go.tmp
echo "package cpu" > cpugen.go.tmp
echo " const CacheLinePadSize = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) cachelinesize` " >> cpugen.go.tmp
echo " const FunctionDescriptors = $( FUNCTION_DESCRIPTORS) " >> cpugen.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh cpugen.go.tmp cpugen.go
$( STAMP) $@
2022-10-27 18:55:19 +00:00
gcpugen.go : s -gcpu ; @true
s-gcpu : Makefile goarch .sh
rm -f gcpugen.go.tmp
echo "package cpu" > gcpugen.go.tmp
echo " const cacheLineSize = ` $( SHELL) $( srcdir) /goarch.sh $( GOARCH) cachelinesize` " >> gcpugen.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh gcpugen.go.tmp gcpugen.go
$( STAMP) $@
goroot.go : s -goroot ; @true
s-goroot : Makefile
rm -f goroot.go.tmp
echo "package runtime" > goroot.go.tmp
echo 'var defaultGOROOT = `$(prefix)`' >> goroot.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh goroot.go.tmp goroot.go
$( STAMP) $@
buildcfg.go : s -buildcfg ; @true
s-buildcfg : Makefile
rm -f buildcfg.go.tmp
echo "package buildcfg" > buildcfg.go.tmp
echo "import \"runtime\"" >> buildcfg.go.tmp
echo 'func defaultGOROOTValue() string { return `$(prefix)` }' >> buildcfg.go.tmp
echo 'const defaultGO386 = `sse2`' >> buildcfg.go.tmp
echo 'const defaultGOAMD64 = `v1`' >> buildcfg.go.tmp
echo 'const defaultGOARM = `5`' >> buildcfg.go.tmp
echo 'const defaultGOMIPS = `hardfloat`' >> buildcfg.go.tmp
echo 'const defaultGOMIPS64 = `hardfloat`' >> buildcfg.go.tmp
echo 'const defaultGOPPC64 = `power8`' >> buildcfg.go.tmp
echo 'const defaultGOEXPERIMENT = `fieldtrack`' >> buildcfg.go.tmp
echo 'const defaultGO_EXTLINK_ENABLED = ``' >> buildcfg.go.tmp
echo 'const defaultGO_LDSO = ``' >> buildcfg.go.tmp
echo 'const version = `' ` cat $( srcdir) /VERSION | sed 1q` ' ' ` $( GOC) --version | sed 1q` '`' >> buildcfg.go.tmp
echo 'const defaultGOOS = runtime.GOOS' >> buildcfg.go.tmp
echo 'const defaultGOARCH = runtime.GOARCH' >> buildcfg.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh buildcfg.go.tmp buildcfg.go
$( STAMP) $@
2018-12-28 15:30:48 +00:00
objabi.go : s -objabi ; @true
s-objabi : Makefile
rm -f objabi.go.tmp
echo "package objabi" > objabi.go.tmp
2019-06-02 15:48:37 +00:00
echo 'const stackGuardMultiplierDefault = 1' >> objabi.go.tmp
2018-12-28 15:30:48 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh objabi.go.tmp objabi.go
$( STAMP) $@
gccgosizes.go : s -gccgosizes ; @true
s-gccgosizes : Makefile goarch .sh
rm -f gccgosizes.go.tmp
echo "package types" > gccgosizes.go.tmp
echo >> gccgosizes.go.tmp
echo "var gccgoArchSizes = map[string]*StdSizes{" >> gccgosizes.go.tmp
for a in $( ALLGOARCH) ; do \
ptrsize = ` $( SHELL) $( srcdir) /goarch.sh $$ a ptrsize` ; \
maxalign = ` $( SHELL) $( srcdir) /goarch.sh $$ a maxalign` ; \
echo " \" $$ a\": { $$ {ptrsize}, $$ {maxalign}}, " >> gccgosizes.go.tmp; \
done
echo "}" >> gccgosizes.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh gccgosizes.go.tmp gccgosizes.go
$( STAMP) $@
2022-10-27 18:55:19 +00:00
os_linknames.go : s -os_linknames ; @true
s-os_linknames : os -list gen -sysinfo .go $( srcdir ) /mklinknames .awk $( srcdir ) /go /os /*.go
rm -f os_linknames.go.tmp
$( AWK) -f $( srcdir) /mklinknames.awk -v package = os ` cat os-list` > os_linknames.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh os_linknames.go.tmp os_linknames.go
$( STAMP) $@
os-list : s -os -list ; @true
s-os-list : Makefile $( srcdir ) /go /os /*.go
rm -f os-list.tmp
$( SHELL) $( srcdir) /match.sh --goarch= $( GOARCH) --goos= $( GOOS) --srcdir= $( srcdir) /go/os > os-list.tmp
$( SHELL) $( srcdir) /mvifdiff.sh os-list.tmp os-list
$( STAMP) $@
os_user_linknames.go : s -os_user_linknames ; @true
s-os_user_linknames : os -user -list gen -sysinfo .go $( srcdir ) /mklinknames .awk $( srcdir ) /go /os /user /*.go
rm -f os_user_linknames.go.tmp
$( AWK) -f $( srcdir) /mklinknames.awk -v package = user ` cat os-user-list` > os_user_linknames.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh os_user_linknames.go.tmp os_user_linknames.go
$( STAMP) $@
os-user-list : s -os -user -list ; @true
s-os-user-list : Makefile $( srcdir ) /go /os /user /*.go
rm -f os-user-list.tmp
$( SHELL) $( srcdir) /match.sh --goarch= $( GOARCH) --goos= $( GOOS) --srcdir= $( srcdir) /go/os/user > os-user-list.tmp
$( SHELL) $( srcdir) /mvifdiff.sh os-user-list.tmp os-user-list
$( STAMP) $@
runtime_linknames.go : s -runtime_linknames ; @true
s-runtime_linknames : runtime -list gen -sysinfo .go $( srcdir ) /mklinknames .awk $( srcdir ) /go /runtime /*.go
rm -f runtime_linknames.go.tmp
$( AWK) -f $( srcdir) /mklinknames.awk -v package = runtime ` cat runtime-list` > runtime_linknames.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh runtime_linknames.go.tmp runtime_linknames.go
$( STAMP) $@
runtime-list : s -runtime -list ; @true
s-runtime-list : Makefile $( srcdir ) /go /runtime /*.go
rm -f runtime-list.tmp
$( SHELL) $( srcdir) /match.sh --goarch= $( GOARCH) --goos= $( GOOS) --srcdir= $( srcdir) /go/runtime > runtime-list.tmp
$( SHELL) $( srcdir) /mvifdiff.sh runtime-list.tmp runtime-list
$( STAMP) $@
2017-10-07 00:16:47 +00:00
runtime_sysinfo.go : s -runtime_sysinfo ; @true
s-runtime_sysinfo : $( srcdir ) /mkrsysinfo .sh gen -sysinfo .go
2018-12-28 15:30:48 +00:00
GOARCH = $( GOARCH) GOOS = $( GOOS) $( SHELL) $( srcdir) /mkrsysinfo.sh
2017-10-07 00:16:47 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh tmp-runtime_sysinfo.go runtime_sysinfo.go
$( STAMP) $@
sigtab.go : s -sigtab ; @true
s-sigtab : $( srcdir ) /mksigtab .sh gen -sysinfo .go
GOOS = $( GOOS) $( SHELL) $( srcdir) /mksigtab.sh > tmp-sigtab.go
$( SHELL) $( srcdir) /mvifdiff.sh tmp-sigtab.go sigtab.go
$( STAMP) $@
2018-12-28 15:30:48 +00:00
GCCGO_INSTALL_NAME := $( shell echo gccgo| sed '$(program_transform_name)' )
GCC_INSTALL_NAME := $( shell echo gcc| sed '$(program_transform_name)' )
GXX_INSTALL_NAME := $( shell echo g++| sed '$(program_transform_name)' )
zdefaultcc.go : s -zdefaultcc ; @true
s-zdefaultcc : Makefile
echo 'package cfg' > zdefaultcc.go.tmp
echo >> zdefaultcc.go.tmp
echo 'func DefaultGCCGO(goos, goarch string) string { return "$(bindir)/$(GCCGO_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
echo 'func DefaultCC(goos, goarch string) string { return "$(GCC_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
echo 'func DefaultCXX(goos, goarch string) string { return "$(GXX_INSTALL_NAME)" }' >> zdefaultcc.go.tmp
echo 'const DefaultPkgConfig = "pkg-config"' >> zdefaultcc.go.tmp
echo 'var OSArchSupportsCgo = map[string]bool{}' >> zdefaultcc.go.tmp
$( SHELL) $( srcdir) /../move-if-change zdefaultcc.go.tmp zdefaultcc.go
$( STAMP) $@
2019-06-02 15:48:37 +00:00
# Post-process runtime.inc.raw (raw output of -fgo-c-header option when
# compiling runtime) to prune out certain types that should not be
# exported back to C. See comments in mkruntimeinc.sh for more details.
2017-10-07 00:16:47 +00:00
runtime.inc : s -runtime -inc ; @true
2022-10-27 18:55:19 +00:00
s-runtime-inc : runtime .lo mkruntimeinc .sh Makefile
2019-06-02 15:48:37 +00:00
$( SHELL) $( srcdir) /mkruntimeinc.sh
$( SHELL) $( srcdir) /mvifdiff.sh tmp-runtime.inc runtime.inc
2017-10-07 00:16:47 +00:00
$( STAMP) $@
2018-12-28 15:30:48 +00:00
noinst_DATA += zdefaultcc.go
2015-08-28 15:33:40 +00:00
# Generate the list of go std packages that were included in libgo
zstdpkglist.go : s -zstdpkglist ; @true
2022-10-27 18:55:19 +00:00
s-zstdpkglist : Makefile libgo -packages .txt
2015-08-28 15:33:40 +00:00
rm -f zstdpkglist.go.tmp
2019-06-02 15:48:37 +00:00
echo 'package goroot' > zstdpkglist.go.tmp
2015-08-28 15:33:40 +00:00
echo "" >> zstdpkglist.go.tmp
echo 'var stdpkg = map[string]bool{' >> zstdpkglist.go.tmp
2022-10-27 18:55:19 +00:00
echo $( libgo_go_objs) 'unsafe.lo' | sed 's|[a-z0-9_./]*_c\.lo||g' | sed 's|golang\.org/[a-z0-9_./]*\.lo||g' | sed 's|\([a-z0-9_./]*\)\.lo|"\1": true,|g' >> zstdpkglist.go.tmp
2015-08-28 15:33:40 +00:00
echo '}' >> zstdpkglist.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh zstdpkglist.go.tmp zstdpkglist.go
2012-03-27 23:13:14 +00:00
$( STAMP) $@
2014-09-21 17:33:12 +00:00
i f L I B G O _ I S _ L I N U X
2017-10-07 00:16:47 +00:00
syscall_epoll_file = epoll.go
2017-04-10 11:32:00 +00:00
e l s e
2017-10-07 00:16:47 +00:00
syscall_epoll_file =
2017-04-10 11:32:00 +00:00
e n d i f
2012-03-27 23:13:14 +00:00
libcalls.go : s -libcalls ; @true
2017-10-07 00:16:47 +00:00
s-libcalls : libcalls -list go /syscall /mksyscall .awk $( srcdir ) /go /syscall /*.go
2012-03-27 23:13:14 +00:00
rm -f libcalls.go.tmp
2017-10-07 00:16:47 +00:00
$( AWK) -f $( srcdir) /go/syscall/mksyscall.awk ` cat libcalls-list` > libcalls.go.tmp
2015-08-28 15:33:40 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh libcalls.go.tmp libcalls.go
2012-03-27 23:13:14 +00:00
$( STAMP) $@
2014-09-21 17:33:12 +00:00
libcalls-list : s -libcalls -list ; @true
2017-10-07 00:16:47 +00:00
s-libcalls-list : Makefile $( srcdir ) /go /syscall /*.go
2014-09-21 17:33:12 +00:00
rm -f libcalls-list.tmp
2017-10-07 00:16:47 +00:00
$( SHELL) $( srcdir) /match.sh --goarch= $( GOARCH) --goos= $( GOOS) --srcdir= $( srcdir) /go/syscall $( matchargs_syscall) > libcalls-list.tmp
2015-08-28 15:33:40 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh libcalls-list.tmp libcalls-list
2014-09-21 17:33:12 +00:00
$( STAMP) $@
2012-03-27 23:13:14 +00:00
syscall_arch.go : s -syscall_arch ; @true
s-syscall_arch : Makefile
rm -f syscall_arch.go.tmp
echo "package syscall" > syscall_arch.go.tmp
echo 'const ARCH = "' $( GOARCH) '"' >> syscall_arch.go.tmp
echo 'const OS = "' $( GOOS) '"' >> syscall_arch.go.tmp
2015-08-28 15:33:40 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh syscall_arch.go.tmp syscall_arch.go
2012-03-27 23:13:14 +00:00
$( STAMP) $@
2022-10-27 18:55:19 +00:00
syscall_linknames.go : s -syscall_linknames ; @true
s-syscall_linknames : libcalls .go gen -sysinfo .go $( srcdir ) /mklinknames .awk
rm -f syscall_linknames.go.tmp
$( AWK) -v package = syscall -f $( srcdir) /mklinknames.awk libcalls.go > syscall_linknames.go.tmp
$( SHELL) $( srcdir) /mvifdiff.sh syscall_linknames.go.tmp syscall_linknames.go
$( STAMP) $@
2017-10-07 00:16:47 +00:00
SYSINFO_FLAGS = \
$( DEFS) $( DEFAULT_INCLUDES) $( INCLUDES) $( AM_CPPFLAGS) \
$( CPPFLAGS) $( OSCFLAGS) -O
gen-sysinfo.go : s -gen -sysinfo ; @true
s-gen-sysinfo : $( srcdir ) /sysinfo .c config .h
$( CC) $( SYSINFO_FLAGS) -fdump-go-spec= tmp-gen-sysinfo.go -std= gnu99 -S -o sysinfo.s $( srcdir) /sysinfo.c
rm -f sysinfo.s
$( SHELL) $( srcdir) /mvifdiff.sh tmp-gen-sysinfo.go gen-sysinfo.go
$( STAMP) $@
errno.i : s -errno ; @true
s-errno :
echo '#include <errno.h>' | $( CC) $( SYSINFO_FLAGS) -x c - -E -dM > tmp-errno.i
$( SHELL) $( srcdir) /mvifdiff.sh tmp-errno.i errno.i
$( STAMP) $@
2012-03-27 23:13:14 +00:00
sysinfo.go : s -sysinfo ; @true
2017-10-07 00:16:47 +00:00
s-sysinfo : $( srcdir ) /mksysinfo .sh gen -sysinfo .go errno .i
2018-12-28 15:30:48 +00:00
GOARCH = $( GOARCH) GOOS = $( GOOS) $( SHELL) $( srcdir) /mksysinfo.sh
2015-08-28 15:33:40 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh tmp-sysinfo.go sysinfo.go
2012-03-27 23:13:14 +00:00
$( STAMP) $@
# The epoll struct has an embedded union and is packed on x86_64,
# which is too complicated for mksysinfo.sh. We find the offset of
# the only field we care about in configure.ac, and generate the
# struct here.
epoll.go : s -epoll ; @true
s-epoll : Makefile
rm -f epoll.go.tmp
echo 'package syscall' > epoll.go.tmp
echo 'type EpollEvent struct {' >> epoll.go.tmp
echo ' Events uint32' >> epoll.go.tmp
case " $( SIZEOF_STRUCT_EPOLL_EVENT) , $( STRUCT_EPOLL_EVENT_FD_OFFSET) " in \
0,0) echo 1>& 2 "*** struct epoll_event data.fd offset unknown" ; \
exit 1; ; ; \
8,4) echo ' Fd int32' >> epoll.go.tmp; ; ; \
12,4) echo ' Fd int32' >> epoll.go.tmp; \
echo ' Pad [4]byte' >> epoll.go.tmp; ; ; \
12,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
echo ' Fd int32' >> epoll.go.tmp; ; ; \
16,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
echo ' Fd int32' >> epoll.go.tmp; \
echo ' Pad2 [4]byte' >> epoll.go.tmp; ; ; \
*) echo 1>& 2 "*** struct epoll_event unsupported" ; \
exit 1; ; ; \
esac
echo '}' >> epoll.go.tmp
2015-08-28 15:33:40 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh epoll.go.tmp epoll.go
2012-03-27 23:13:14 +00:00
$( STAMP) $@
i f L I B G O _ I S _ L I N U X
2017-10-07 00:16:47 +00:00
syscall_lib_clone_lo = syscall/clone_linux.lo
e l s e
syscall_lib_clone_lo =
e n d i f
2022-10-27 18:55:19 +00:00
i f L I B G O _ I S _ X 8 6
golangorg_x_sys_cpu_gccgo_x86_lo = golang.org/x/sys/cpu_gccgo_x86.lo
e l s e
golangorg_x_sys_cpu_gccgo_x86_lo =
e n d i f
2019-06-02 15:48:37 +00:00
PACKAGES = $( shell cat $( srcdir) /libgo-packages.txt)
2012-03-27 23:13:14 +00:00
libgo_go_objs = \
2017-10-07 00:16:47 +00:00
$( addsuffix .lo,$( PACKAGES) ) \
2019-06-02 15:48:37 +00:00
internal/bytealg/bytealg.lo \
2015-08-28 15:33:40 +00:00
reflect/makefunc_ffi_c.lo \
2017-10-07 00:16:47 +00:00
$( syscall_lib_clone_lo) \
2014-09-21 17:33:12 +00:00
syscall/errno.lo \
syscall/signame.lo \
syscall/wait.lo \
2022-10-27 18:55:19 +00:00
runtime/internal/syscall/errno.lo \
os/dir_gccgo_c.lo \
$( golangorg_x_net_lif_lo) \
$( golangorg_x_net_route_lo) \
2012-03-27 23:13:14 +00:00
log/syslog/syslog_c.lo \
$( os_lib_inotify_lo) \
2017-10-07 00:16:47 +00:00
runtime/internal/atomic_c.lo \
2019-06-02 15:48:37 +00:00
sync/atomic_c.lo \
2022-10-27 18:55:19 +00:00
internal/cpu/cpu_gccgo.lo \
$( golangorg_x_sys_cpu_gccgo_x86_lo)
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
libgo_ldflags = \
2014-09-21 17:33:12 +00:00
-version-info $( libtool_VERSION) $( PTHREAD_CFLAGS) $( AM_LDFLAGS)
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
libgo_libadd = \
2014-09-21 17:33:12 +00:00
$( libgo_go_objs) ../libbacktrace/libbacktrace.la \
2015-08-28 15:33:40 +00:00
$( LIBATOMIC) $( LIBFFI) $( PTHREAD_LIBS) $( MATH_LIBS) $( NET_LIBS)
libgo_la_SOURCES = $( runtime_files)
libgo_la_LDFLAGS = $( libgo_ldflags)
libgo_la_LIBADD = $( libgo_libadd)
libgo_llgo_la_SOURCES = $( runtime_files)
libgo_llgo_la_LDFLAGS = $( libgo_ldflags)
libgo_llgo_la_LIBADD = $( libgo_libadd)
2012-03-27 23:13:14 +00:00
libgobegin_a_SOURCES = \
runtime/go-main.c
2015-08-28 15:33:40 +00:00
libgobegin_llgo_a_SOURCES = \
runtime/go-main.c
# Use -fPIC for libgobegin so that it can be put in a PIE.
libgobegin_a_CFLAGS = $( AM_CFLAGS) -fPIC
libgobegin_llgo_a_CFLAGS = $( AM_CFLAGS) -fPIC
libgolibbegin_a_SOURCES = \
runtime/go-libmain.c
libgolibbegin_a_CFLAGS = $( AM_CFLAGS) -fPIC
2019-06-02 15:48:37 +00:00
GOTOOL_PACKAGES = $( shell cat $( srcdir) /gotool-packages.txt)
2018-12-28 15:30:48 +00:00
libgotool_a_SOURCES =
libgotool_a_DEPENDENCIES = $( addsuffix .lo,$( GOTOOL_PACKAGES) )
libgotool_a_LIBADD = $( addsuffix .o,$( GOTOOL_PACKAGES) )
d e f i n e S T A T I C _ t e m p l a t e
$( subst -,_ ,$ ( subst .,_ ,$ ( subst /,_ ,$ ( 1) ) ) ) _GOCFLAGS = -static
e n d e f
$( foreach package ,$ ( GOTOOL_PACKAGES ) ,$ ( eval $ ( call STATIC_template ,$ ( package ) .lo ) ) )
2017-10-07 00:16:47 +00:00
# Make sure runtime.inc is built before compiling any .c file.
$(libgo_la_OBJECTS) : runtime .inc
$(libgo_llgo_la_OBJECTS) : runtime .inc
$(libgobegin_a_OBJECTS) : runtime .inc
$(libgobegin_llgo_a_OBJECTS) : runtime .inc
$(libgolibbegin_a_OBJECTS) : runtime .inc
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
LTLDFLAGS = $( shell $( SHELL) $( top_srcdir) /../libtool-ldflags $( LDFLAGS) )
GOCFLAGS = $( CFLAGS)
2017-04-10 11:32:00 +00:00
AM_GOCFLAGS = $( STRINGOPS_FLAG) $( GO_SPLIT_STACK)
2012-03-27 23:13:14 +00:00
GOCOMPILE = $( GOC) $( DEFAULT_INCLUDES) $( INCLUDES) $( AM_GOCFLAGS) $( GOCFLAGS)
LTGOCOMPILE = $( LIBTOOL) --tag GO --mode= compile $( GOC) $( INCLUDES) \
$( AM_GOCFLAGS) $( GOCFLAGS)
GOLINK = $( LIBTOOL) --tag GO --mode-link $( GOC) \
$( OPT_LDFLAGS) $( SECTION_LDFLAGS) $( AM_GOCFLAGS) $( LTLDFLAGS) -o $@
# Build the dependencies for a Go package.
BUILDDEPS = \
$( MKDIR_P) $( @D) ; \
2017-10-07 00:16:47 +00:00
dir = ` echo $@ | sed -e 's/.lo.dep$$//' ` ; \
2022-10-27 18:55:19 +00:00
files = ` $( SHELL) $( srcdir) /match.sh --goarch= $( GOARCH) --goos= $( GOOS) --srcdir= $( srcdir) /go/$$ dir --extrafiles= " $( extra_go_files_$( subst .,_,$( subst /,_,$( subst .lo.dep,,$@ ) ) ) ) " $( matchargs_$( subst /,_,$( subst .lo.dep,,$@ ) ) ) ` ; \
2017-10-07 00:16:47 +00:00
$( SHELL) $( srcdir) /godeps.sh ` echo $@ | sed -e 's/.dep$$//' ` $$ files > $@ .tmp; \
if ! cmp $@ .tmp $@ >/dev/null 2>/dev/null; then \
rm -f ` echo $@ | sed -e 's/\.dep$$//' ` ; \
fi ; \
2012-03-27 23:13:14 +00:00
mv -f $@ .tmp $@
# Build the .go files for a package, generating a .lo file.
BUILDPACKAGE = \
$( MKDIR_P) $( @D) ; \
2017-10-07 00:16:47 +00:00
files = ` echo $^ | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//' ` ; \
2019-06-02 15:48:37 +00:00
$( LTGOCOMPILE) -I . -c -fgo-pkgpath= ` echo $@ | sed -e 's/.lo$$//' ` $( $( subst -,_,$( subst .,_,$( subst /,_,$@ ) ) ) _GOCFLAGS) -o $@ $$ files
2012-03-27 23:13:14 +00:00
2017-10-07 00:16:47 +00:00
# How to build a .gox file from a .lo file.
2018-12-28 15:30:48 +00:00
# Matching .o file can either be in the same directory as the .lo (non-PIC
# object) or in the .libs directory (PIC object).
2017-10-07 00:16:47 +00:00
BUILDGOX = \
2018-12-28 15:30:48 +00:00
f = " $( basename $<) .o " ; \
if test ! -f $$ f; then \
f = " $( basename $( <D) /.libs/$( <F) ) .o " ; \
fi ; \
2019-06-02 15:48:37 +00:00
$( OBJCOPY) -j $( GO_EXPORT_SECTION_NAME) $$ f $@ .tmp; \
2017-10-07 00:16:47 +00:00
$( SHELL) $( srcdir) /mvifdiff.sh $@ .tmp ` echo $@ | sed -e 's/s-gox/gox/' `
2015-08-28 15:33:40 +00:00
2012-03-27 23:13:14 +00:00
GOTESTFLAGS =
2015-08-28 15:33:40 +00:00
GOBENCH =
2012-03-27 23:13:14 +00:00
# Check a package.
CHECK = \
2014-09-21 17:33:12 +00:00
GC = " $( GOC) $( GOCFLAGS) $( $( subst /,_,$@ ) _GOCFLAGS) -L ` ${ PWD_COMMAND } ` -L ` ${ PWD_COMMAND } `/.libs " ; \
2012-03-27 23:13:14 +00:00
export GC; \
2022-10-27 18:55:19 +00:00
GOLIBS = " $( extra_check_libs_$( subst .,_,$( subst /,_,$( @D) ) ) ) $( PTHREAD_LIBS) $( MATH_LIBS) $( NET_LIBS) $( LIBS) " ; \
2012-03-27 23:13:14 +00:00
export GOLIBS; \
RUNTESTFLAGS = " $( RUNTESTFLAGS) " ; \
export RUNTESTFLAGS; \
MAKE = " $( MAKE) " ; \
export MAKE; \
2018-12-28 15:30:48 +00:00
NM = " $( NM) " ; \
export NM; \
libgccdir = ` ${ GOC } ${ GOCFLAGS } -print-libgcc-file-name | sed -e 's|/[^/]*$$||' ` ; \
2012-03-27 23:13:14 +00:00
LD_LIBRARY_PATH = " ` ${ PWD_COMMAND } `/.libs: $$ {libgccdir}: ${ LD_LIBRARY_PATH } " ; \
LD_LIBRARY_PATH = ` echo $$ { LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,' ` ; \
export LD_LIBRARY_PATH; \
2014-09-21 17:33:12 +00:00
$( MKDIR_P) $( @D) ; \
2012-03-27 23:13:14 +00:00
rm -f $@ -testsum $@ -testlog; \
2022-10-27 18:55:19 +00:00
files = ` $( SHELL) $( srcdir) /match.sh --goarch= $( GOARCH) --goos= $( GOOS) --srcdir= $( srcdir) /go/$( @D) --extrafiles= " $( extra_go_files_$( subst .,_,$( subst /,_,$( @D) ) ) ) " $( matchargs_$( subst /,_,$( @D) ) ) ` ; \
2014-09-21 17:33:12 +00:00
if test " $( USE_DEJAGNU) " = "yes" ; then \
2017-10-07 00:16:47 +00:00
$( SHELL) $( srcdir) /testsuite/gotest --goarch= $( GOARCH) --goos= $( GOOS) --dejagnu= yes --basedir= $( srcdir) --srcdir= $( srcdir) /go/$( @D) --pkgpath= " $( @D) " --pkgfiles= " $$ files " --testname= " $( @D) " $( GOTESTFLAGS) ; \
2015-08-28 15:33:40 +00:00
elif test " $( GOBENCH) " != "" ; then \
2017-10-07 00:16:47 +00:00
$( SHELL) $( srcdir) /testsuite/gotest --goarch= $( GOARCH) --goos= $( GOOS) --basedir= $( srcdir) --srcdir= $( srcdir) /go/$( @D) --pkgpath= " $( @D) " --pkgfiles= " $$ files " --bench= " $( GOBENCH) " $( GOTESTFLAGS) ; \
2012-03-27 23:13:14 +00:00
else \
2017-10-07 00:16:47 +00:00
if $( SHELL) $( srcdir) /testsuite/gotest --goarch= $( GOARCH) --goos= $( GOOS) --basedir= $( srcdir) --srcdir= $( srcdir) /go/$( @D) --pkgpath= " $( @D) " --pkgfiles= " $$ files " $( GOTESTFLAGS) >>$@ -testlog 2>& 1; then \
2012-03-27 23:13:14 +00:00
echo " PASS: $( @D) " >> $@ -testlog; \
echo " PASS: $( @D) " ; \
echo " PASS: $( @D) " > $@ -testsum; \
else \
echo " FAIL: $( @D) " >> $@ -testlog; \
cat $@ -testlog; \
echo " FAIL: $( @D) " > $@ -testsum; \
exit 1; \
fi ; \
fi
# Build all packages before checking any.
2015-08-28 15:33:40 +00:00
CHECK_DEPS = \
2012-03-27 23:13:14 +00:00
$( toolexeclibgo_DATA) \
$( toolexeclibgoarchive_DATA) \
$( toolexeclibgocompress_DATA) \
$( toolexeclibgocontainer_DATA) \
$( toolexeclibgocrypto_DATA) \
$( toolexeclibgodebug_DATA) \
$( toolexeclibgoencoding_DATA) \
$( toolexeclibgogo_DATA) \
$( toolexeclibgohash_DATA) \
$( toolexeclibgoimage_DATA) \
$( toolexeclibgoindex_DATA) \
$( toolexeclibgoio_DATA) \
$( toolexeclibgolog_DATA) \
$( toolexeclibgomath_DATA) \
$( toolexeclibgomime_DATA) \
$( toolexeclibgonet_DATA) \
$( toolexeclibgonethttp_DATA) \
$( toolexeclibgoos_DATA) \
$( toolexeclibgopath_DATA) \
$( toolexeclibgorpc_DATA) \
$( toolexeclibgoruntime_DATA) \
$( toolexeclibgosync_DATA) \
$( toolexeclibgotesting_DATA) \
$( toolexeclibgotext_DATA) \
$( toolexeclibgotexttemplate_DATA) \
2018-12-28 15:30:48 +00:00
$( toolexeclibgounicode_DATA) \
$( noinst_DATA) \
$( noinst_LIBRARIES)
2012-03-27 23:13:14 +00:00
2015-08-28 15:33:40 +00:00
i f G O C _ I S _ L L G O
CHECK_DEPS += libgo-llgo.la libgobegin-llgo.a
e l s e
CHECK_DEPS += libgo.la libgobegin.a
e n d i f
2017-10-07 00:16:47 +00:00
# PACKAGE_template defines the rules for each package.
# For example, for the package bufio, it produces:
#
# @go_include@ bufio.lo.dep
# bufio.lo.dep: $(srcdir)/go/bufio/*.go
# $(BUILDDEPS)
# bufio.lo:
# $(BUILDPACKAGE)
# bufio/check: $(CHECK_DEPS)
# @$(CHECK)
# .PHONY: bufio/check
#
# This is invoked with $(1) set to a package, which is a directory name,
# such as "bufio" or "archive/tar".
d e f i n e P A C K A G E _ t e m p l a t e
@ g o _ i n c l u d e @ $( 1) . l o . d e p
$(1).lo.dep : $( srcdir ) /go /$( 1) /*.go
$$ ( BUILDDEPS)
$(1).lo :
$$ ( BUILDPACKAGE)
$(1)/check : $$( CHECK_DEPS )
@$$ ( CHECK)
.PHONY : $( 1) /check
$(1).gox : $( 1) .s -gox ; @true
$(1).s-gox : $( 1) .lo
$$ ( BUILDGOX)
$$ ( STAMP) $$ @
e n d e f
# This line expands PACKAGE_template once for each package name listed
# in $(PACKAGES).
$( foreach package ,$ ( PACKAGES ) ,$ ( eval $ ( call PACKAGE_template ,$ ( package ) ) ) )
2018-12-28 15:30:48 +00:00
$( foreach package ,$ ( GOTOOL_PACKAGES ) ,$ ( eval $ ( call PACKAGE_template ,$ ( package ) ) ) )
2017-10-07 00:16:47 +00:00
# Pass -ffp-contract=off, or 386-specific options, when building the
# math package. MATH_FLAG is defined in configure.ac.
math_lo_GOCFLAGS = $( MATH_FLAG)
2018-12-28 15:30:48 +00:00
math_check_GOCFLAGS = $( MATH_FLAG)
2017-10-07 00:16:47 +00:00
2022-10-27 18:55:19 +00:00
# Add generated files to the runtime package.
extra_go_files_runtime = \
runtime_linknames.go runtime_sysinfo.go sigtab.go goroot.go
2017-10-07 00:16:47 +00:00
runtime.lo.dep : $( extra_go_files_runtime )
# Add generated files to the syscall package.
extra_go_files_syscall = \
libcalls.go \
sysinfo.go \
syscall_arch.go \
2022-10-27 18:55:19 +00:00
syscall_linknames.go \
2017-10-07 00:16:47 +00:00
$( syscall_epoll_file)
syscall.lo.dep : $( extra_go_files_syscall )
# Pass -fgo-compiling-runtime when compiling the runtime package.
2019-06-02 15:48:37 +00:00
runtime_lo_GOCFLAGS = -fgo-c-header= runtime.inc.raw -fgo-compiling-runtime
2017-10-07 00:16:47 +00:00
runtime_check_GOCFLAGS = -fgo-compiling-runtime
runtime_internal_atomic_lo_GOCFLAGS = -fgo-compiling-runtime
runtime_internal_atomic_lo_check_GOCFLAGS = -fgo-compiling-runtime
runtime_internal_sys_lo_GOCFLAGS = -fgo-compiling-runtime
runtime_internal_sys_lo_check_GOCFLAGS = -fgo-compiling-runtime
# If libffi is supported (the normal case) use the ffi build tag for
# the runtime package.
i f U S E _ L I B F F I
matchargs_runtime = --tag= libffi
e l s e
matchargs_runtime =
e n d i f
2014-09-21 17:33:12 +00:00
# At least for now, we need -static-libgo for this test, because
# otherwise we can't get the line numbers.
2015-08-28 15:33:40 +00:00
# Also use -fno-inline to get better results from the memory profiler.
runtime_pprof_check_GOCFLAGS = -static-libgo -fno-inline
2012-03-27 23:13:14 +00:00
2022-10-27 18:55:19 +00:00
i f L I B G O _ I S _ A I X
# reflect tests must be done with -static-libgo. Otherwize,
# there will be a duplication of the canonicalization map.
reflect_check_GOCFLAGS = -static-libgo -Wl,-bbigtoc
e n d i f
i f H A V E _ S T A T I C _ L I N K
# Use -static for the syscall tests if possible, because otherwise when
# running as root the re-execs ignore LD_LIBRARY_PATH.
syscall_check_GOCFLAGS = -static
e n d i f
2017-10-07 00:16:47 +00:00
extra_go_files_runtime_internal_sys = version.go
runtime/internal/sys.lo.dep : $( extra_go_files_runtime_internal_sys )
2019-06-02 15:48:37 +00:00
extra_go_files_internal_cpu = cpugen.go
internal/cpu.lo.dep : $( extra_go_files_internal_cpu )
2022-10-27 18:55:19 +00:00
extra_go_files_internal_goarch = zgoarch.go
internal/goarch.lo.dep : $( extra_go_files_internal_goarch )
extra_go_files_internal_goos = zgoos.go
internal/goos.lo.dep : $( extra_go_files_internal_goos )
extra_go_files_golang_org_x_sys_cpu = gcpugen.go
golang.org/x/sys/cpu.lo.dep : $( extra_go_files_golang_org_x_sys_cpu )
extra_go_files_internal_buildcfg = buildcfg.go
cmd/internal/buildcfg.lo.dep : $( extra_go_files_internal_buildcfg )
2019-06-02 15:48:37 +00:00
extra_go_files_internal_goroot = zstdpkglist.go
internal/goroot.lo.dep : $( extra_go_files_internal_goroot )
2018-12-28 15:30:48 +00:00
extra_go_files_go_types = gccgosizes.go
go/types.lo.dep : $( extra_go_files_go_types )
extra_go_files_cmd_internal_objabi = objabi.go
cmd/internal/objabi.lo.dep : $( extra_go_files_cmd_internal_objabi )
extra_go_files_cmd_go_internal_cfg = zdefaultcc.go
cmd/go/internal/cfg.lo.dep : $( extra_go_files_cmd_go_internal_cfg )
2022-10-27 18:55:19 +00:00
extra_go_files_os = os_linknames.go
os.lo.dep : $( extra_go_files_os )
extra_go_files_os_user = os_user_linknames.go
os/user.lo.dep : $( extra_go_files_os_user )
2018-12-28 15:30:48 +00:00
extra_check_libs_cmd_go_internal_cache = $( abs_builddir) /libgotool.a
2022-10-27 18:55:19 +00:00
extra_check_libs_cmd_go_internal_fsys = $( abs_builddir) /libgotool.a
2018-12-28 15:30:48 +00:00
extra_check_libs_cmd_go_internal_generate = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_get = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_load = $( abs_builddir) /libgotool.a
2019-06-02 15:48:37 +00:00
extra_check_libs_cmd_go_internal_lockedfile = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_imports = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_modconv = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_modfetch = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_modfetch_codehost = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_modfile = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_modload = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_module = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_mvs = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_search = $( abs_builddir) /libgotool.a
2022-10-27 18:55:19 +00:00
extra_check_libs_cmd_go_internal_str = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_test = $( abs_builddir) /libgotool.a
extra_check_libs_cmd_go_internal_vcs = $( abs_builddir) /libgotool.a
2019-06-02 15:48:37 +00:00
extra_check_libs_cmd_go_internal_web2 = $( abs_builddir) /libgotool.a
2018-12-28 15:30:48 +00:00
extra_check_libs_cmd_go_internal_work = $( abs_builddir) /libgotool.a
2022-10-27 18:55:19 +00:00
extra_check_libs_cmd_internal_buildid = $( abs_builddir) /libgotool.a
2018-12-28 15:30:48 +00:00
extra_check_libs_cmd_vet_internal_cfg = $( abs_builddir) /libgotool.a
2017-10-07 00:16:47 +00:00
# FIXME: The following C files may as well move to the runtime
# directory and be treated like other C files.
2019-06-02 15:48:37 +00:00
# Use C code to speed up internal/bytealg.IndexByte and friends.
internal/bytealg/bytealg.lo : go /internal /bytealg /bytealg .c runtime .inc
@$( MKDIR_P) internal/bytealg
$( LTCOMPILE) -c -o $@ $( srcdir) /go/internal/bytealg/bytealg.c
2017-10-07 00:16:47 +00:00
# Use a C function with a fixed number of arguments to call a C
# varargs function.
log/syslog/syslog_c.lo : go /log /syslog /syslog_c .c runtime .inc
@$( MKDIR_P) log/syslog
$( LTCOMPILE) -c -o $@ $( srcdir) /go/log/syslog/syslog_c.c
# The interface to libffi from the reflect package is written in C.
reflect/makefunc_ffi_c.lo : go /reflect /makefunc_ffi_c .c runtime .inc
@$( MKDIR_P) reflect
$( LTCOMPILE) -c -o $@ $( srcdir) /go/reflect/makefunc_ffi_c.c
# The atomic functions are written in C.
runtime/internal/atomic_c.lo : go /runtime /internal /atomic /atomic .c runtime .inc
@$( MKDIR_P) runtime/internal
$( LTCOMPILE) -c -o $@ $( srcdir) /go/runtime/internal/atomic/atomic.c
sync/atomic_c.lo : go /sync /atomic /atomic .c runtime .inc
@$( MKDIR_P) sync
2012-03-27 23:13:14 +00:00
$( LTCOMPILE) -c -o $@ $( srcdir) /go/sync/atomic/atomic.c
2017-10-07 00:16:47 +00:00
# A few syscall functions are written in C.
syscall/clone_linux.lo : go /syscall /clone_linux .c runtime .inc
2014-09-21 17:33:12 +00:00
@$( MKDIR_P) syscall
2017-10-07 00:16:47 +00:00
$( LTCOMPILE) -c -o $@ $( srcdir) /go/syscall/clone_linux.c
syscall/errno.lo : go /syscall /errno .c runtime .inc
2014-09-21 17:33:12 +00:00
@$( MKDIR_P) syscall
2017-10-07 00:16:47 +00:00
$( LTCOMPILE) -c -o $@ $( srcdir) /go/syscall/errno.c
syscall/signame.lo : go /syscall /signame .c runtime .inc
2014-09-21 17:33:12 +00:00
@$( MKDIR_P) syscall
2017-10-07 00:16:47 +00:00
$( LTCOMPILE) -c -o $@ $( srcdir) /go/syscall/signame.c
syscall/wait.lo : go /syscall /wait .c runtime .inc
@$( MKDIR_P) syscall
$( LTCOMPILE) -c -o $@ $( srcdir) /go/syscall/wait.c
2012-03-27 23:13:14 +00:00
2022-10-27 18:55:19 +00:00
# Some runtime/internal/syscall functions are written in C.
runtime/internal/syscall/errno.lo : go /runtime /internal /syscall /errno .c runtime .inc
@$( MKDIR_P) runtime/internal/syscall
$( LTCOMPILE) -c -o $@ $( srcdir) /go/runtime/internal/syscall/errno.c
# An os function is written in C.
os/dir_gccgo_c.lo : go /os /dir_gccgo_c .c runtime .inc
@$( MKDIR_P) os
$( LTCOMPILE) -c -o $@ $( srcdir) /go/os/dir_gccgo_c.c
2019-06-02 15:48:37 +00:00
# internal/cpu needs some C code.
internal/cpu/cpu_gccgo.lo : go /internal /cpu /cpu_gccgo .c runtime .inc
@$( MKDIR_P) internal/cpu
$( LTCOMPILE) -c -o $@ $( srcdir) /go/internal/cpu/cpu_gccgo.c
2022-10-27 18:55:19 +00:00
# Similarly, golang.org/x/sys/cpu needs some C code.
golang.org/x/sys/cpu_gccgo_x86.lo : go /golang .org /x /sys /cpu /cpu_gccgo_x 86.c runtime .inc
@$( MKDIR_P) golang.org/x/sys
$( LTCOMPILE) -c -o $@ $( srcdir) /go/golang.org/x/sys/cpu/cpu_gccgo_x86.c
2018-12-28 15:30:48 +00:00
# Solaris 11.4 changed the type of fields in struct stat.
2017-10-07 00:16:47 +00:00
# Use a build tag, based on a configure check, to cope.
i f L I B G O _ I S _ S O L A R I S
i f H A V E _ S T A T _ T I M E S P E C
matchargs_os = --tag= solaristag
e l s e
matchargs_os =
e n d i f
e l s e
matchargs_os =
e n d i f
i f L I B G O _ I S _ B S D
2022-10-27 18:55:19 +00:00
# Build golang.org/x/net/route only on BSD systems.
2017-10-07 00:16:47 +00:00
2022-10-27 18:55:19 +00:00
$( eval $ ( call PACKAGE_template ,golang .org /x /net /route ) )
2017-10-07 00:16:47 +00:00
2022-10-27 18:55:19 +00:00
golangorg_x_net_route_lo = \
golang.org/x/net/route.lo
2017-10-07 00:16:47 +00:00
e n d i f
i f L I B G O _ I S _ S O L A R I S
2022-10-27 18:55:19 +00:00
# Build golang.org/x/net/lif only on Solaris systems.
2017-10-07 00:16:47 +00:00
2022-10-27 18:55:19 +00:00
$( eval $ ( call PACKAGE_template ,golang .org /x /net /lif ) )
2017-10-07 00:16:47 +00:00
2022-10-27 18:55:19 +00:00
golangorg_x_net_lif_lo = \
golang.org/x/net/lif.lo
2017-10-07 00:16:47 +00:00
e n d i f
2012-03-27 23:13:14 +00:00
2022-10-27 18:55:19 +00:00
TEST_PACKAGES = $( addsuffix /check,$( shell cat $( srcdir) /check-packages.txt) )
2012-03-27 23:13:14 +00:00
check : check -tail
check-recursive : check -head
check-head :
@echo " Test Run By $$ {USER} on `date` " > libgo.head
@echo " Native configuration is $( host_triplet) " >> libgo.head
@echo >> libgo.head
@echo " === libgo tests ===" >> libgo.head
@echo >> libgo.head
check-tail : check -recursive check -multi
2014-09-21 17:33:12 +00:00
@if test " $( USE_DEJAGNU) " = "yes" ; then \
exit 0; \
fi ; \
lib = ` ${ PWD_COMMAND } | sed -e 's,^.*/\([^/][^/]*\)$$,\1,' ` ; \
2012-03-27 23:13:14 +00:00
for dir in . $( MULTIDIRS) ; do \
mv ../$$ { dir} /$$ { lib} /libgo.sum ../$$ { dir} /$$ { lib} /libgo.sum.sep; \
mv ../$$ { dir} /$$ { lib} /libgo.log ../$$ { dir} /$$ { lib} /libgo.log.sep; \
done ; \
mv libgo.head libgo.sum; \
cp libgo.sum libgo.log; \
echo "Schedule of variations:" >> libgo.sum; \
for dir in . $( MULTIDIRS) ; do \
multidir = ../$$ { dir} /$$ { lib} ; \
multivar = ` cat $$ { multidir} /libgo.var` ; \
echo " $$ {multivar} " >> libgo.sum; \
done ; \
echo >> libgo.sum; \
pass = 0; fail = 0; untested = 0; \
for dir in . $( MULTIDIRS) ; do \
multidir = ../$$ { dir} /$$ { lib} ; \
multivar = ` cat $$ { multidir} /libgo.var` ; \
echo " Running target $$ {multivar} " >> libgo.sum; \
echo " Running $( srcdir) /libgo.exp ... " >> libgo.sum; \
cat $$ { multidir} /libgo.sum.sep >> libgo.sum; \
cat $$ { multidir} /libgo.log.sep >> libgo.log; \
if test -n " ${ MULTIDIRS } " ; then \
echo " === libgo Summary for $$ {multivar} === " >> libgo.sum; \
echo >> libgo.sum; \
fi ; \
p = ` grep -c PASS $$ { multidir} /libgo.sum.sep` ; \
pass = ` expr $$ pass + $$ p` ; \
if test " $$ p " -ne "0" && test -n " ${ MULTIDIRS } " ; then \
echo " # of expected passes $$ p " >> libgo.sum; \
fi ; \
p = ` grep -c FAIL $$ { multidir} /libgo.sum.sep` ; \
fail = ` expr $$ fail + $$ p` ; \
if test " $$ p " -ne "0" && test -n " ${ MULTIDIRS } " ; then \
echo " # of unexpected failures $$ p " >> libgo.sum; \
fi ; \
p = ` grep -c UNTESTED $$ { multidir} /libgo.sum.sep` ; \
untested = ` expr $$ untested + $$ p` ; \
if test " $$ p " -ne "0" && test -n " ${ MULTIDIRS } " ; then \
echo " # of untested testcases $$ p " >> libgo.sum; \
fi ; \
done ; \
echo >> libgo.sum; \
echo " === libgo Summary ===" >> libgo.sum; \
echo >> libgo.sum; \
if test " $$ pass " -ne "0" ; then \
echo " # of expected passes $$ pass " >> libgo.sum; \
fi ; \
if test " $$ fail " -ne "0" ; then \
echo " # of unexpected failures $$ fail " >> libgo.sum; \
fi ; \
if test " $$ untested " -ne "0" ; then \
echo " # of untested testcases $$ untested " >> libgo.sum; \
fi ; \
2022-10-27 18:55:19 +00:00
echo ` echo $( GOC) | sed -e 's/ .*//' ` ` $( GOC) -v 2>& 1 | grep " version" | sed -n -e 's/.* \(version.*\)$$/\1/p' ` >> libgo.sum; \
2012-03-27 23:13:14 +00:00
echo >> libgo.log; \
echo "runtest completed at `date`" >> libgo.log; \
if test " $$ fail " -ne "0" ; then \
status = 1; \
else \
status = 0; \
fi ; \
exit $$ status
check-am :
@rm -f libgo.sum libgo.log libgo.tail
@multivar= "unix" ; \
[ -z " $( MULTIFLAGS) " ] || multivar = " $$ {multivar}/ $( MULTIFLAGS) " ; \
echo " $$ {multivar} " > libgo.var
@for f in $( TEST_PACKAGES) ; do \
rm -f $$ f-testsum $$ f-testlog; \
done
2018-12-28 15:30:48 +00:00
-@$( MAKE) $( AM_MAKEFLAGS) -k $( TEST_PACKAGES)
2012-03-27 23:13:14 +00:00
@for f in $( TEST_PACKAGES) ; do \
if test -f $$ f-testsum; then \
cat $$ f-testsum >> libgo.sum; \
fi ; \
if test -f $$ f-testlog; then \
cat $$ f-testlog >> libgo.log; \
fi ; \
done
check-multi :
$( MULTIDO) $( AM_MAKEFLAGS) DO = check-am multi-do # $(MAKE)
2015-08-28 15:33:40 +00:00
bench :
2018-12-28 15:30:48 +00:00
-@$( MAKE) $( AM_MAKEFLAGS) -k $( TEST_PACKAGES) GOBENCH = .
2015-08-28 15:33:40 +00:00
2018-12-28 15:30:48 +00:00
MOSTLYCLEANFILES = \
s-runtime_sysinfo s-sigtab s-runtime-inc s-zstdpkglist \
s-libcalls s-libcalls-list s-syscall_arch s-gen-sysinfo s-sysinfo \
s-errno s-epoll \
libgo.head libgo.sum.sep libgo.log.sep libgo.var \
2022-10-27 18:55:19 +00:00
libcalls-list \
runtime.inc runtime.inc.tmp2 runtime.inc.tmp3 runtime.inc.raw
2012-03-27 23:13:14 +00:00
mostlyclean-local :
find . -name '*.lo' -print | xargs $( LIBTOOL) --mode= clean rm -f
find . -name '*.$(OBJEXT)' -print | xargs rm -f
find . -name '*-testsum' -print | xargs rm -f
find . -name '*-testlog' -print | xargs rm -f
2018-12-28 15:30:48 +00:00
CLEANFILES = *.go *.c s-* libgo.sum libgo.log runtime.inc
2012-03-27 23:13:14 +00:00
clean-local :
find . -name '*.la' -print | xargs $( LIBTOOL) --mode= clean rm -f
find . -name '*.a' -print | xargs rm -f
2018-12-28 15:30:48 +00:00
find . -name '*.gox' -print | xargs rm -f
find . -name '*.s-gox' -print | xargs rm -f
distclean-local :
find . -name '*.lo.dep' -print | xargs rm -f
2019-06-02 15:48:37 +00:00
i n c l u d e $( top_srcdir ) / . . / m u l t i l i b . a m
2022-10-27 18:55:19 +00:00
i f L I B G O _ I S _ A I X
ALL_LOCAL_DEPS = add-aix-fat-library
e l s e
ALL_LOCAL_DEPS =
e n d i f
all-local : $( ALL_LOCAL_DEPS )
MAJOR = $( firstword $( subst :, ,$( libtool_VERSION) ) )
# If we want to use "AR -r" when creating AIX FAT archives,
# AR must be stripped of all its -X flags.
# Otherwize, if AR was defined with -X32_64, the replace option would
# erase the default .so when adding the extra one. There is no
# order priority within -X flags.
add-aix-fat-library : all -multi
@if test " $( MULTIBUILDTOP) " = "" ; then \
arx = ` echo $( AR) | sed -e 's/-X[^ ]*//g' ` ; \
$$ { arx} -X$( AIX_EXTRA_ARCH) rc .libs/$( PACKAGE) .a ../ppc$( AIX_EXTRA_ARCH) /$( PACKAGE) /.libs/$( PACKAGE) .so.$( MAJOR) ; \
$$ { arx} -X$( AIX_EXTRA_ARCH) rc ../pthread/$( PACKAGE) /.libs/$( PACKAGE) .a ../pthread/ppc$( AIX_EXTRA_ARCH) /$( PACKAGE) /.libs/$( PACKAGE) .so.$( MAJOR) ; \
$$ { arx} -X$( AIX_EXTRA_ARCH) rc libgobegin.a ../ppc$( AIX_EXTRA_ARCH) /$( PACKAGE) /$( libgobegin_a_OBJECTS) ; \
$$ { arx} -X$( AIX_EXTRA_ARCH) rc ../pthread/$( PACKAGE) /libgobegin.a ../pthread/ppc$( AIX_EXTRA_ARCH) /$( PACKAGE) /$( libgobegin_a_OBJECTS) ; \
$$ { arx} -X$( AIX_EXTRA_ARCH) rc libgolibbegin.a ../ppc$( AIX_EXTRA_ARCH) /$( PACKAGE) /$( libgolibbegin_a_OBJECTS) ; \
$$ { arx} -X$( AIX_EXTRA_ARCH) rc ../pthread/$( PACKAGE) /libgolibbegin.a ../pthread/ppc$( AIX_EXTRA_ARCH) /$( PACKAGE) /$( libgolibbegin_a_OBJECTS) ; \
fi