This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgo patch committed: Make cgo generate consistent results


This libgo patch changes the cgo tool to generate consistent results
across different runs.

The go tool will pass -I objdir as one of the flags, where objdir is
the temporary build directory. Remove that from _cgo_flags: we don't
need it, and it will be different each time.

Sort the flags to avoid the unpredictable map iteration order.n

The contents of the flags file matters for gccgo because for a package
that uses cgo, the go tool when building for gccgo will store the
_cgo_flags file in the archive. That means that we want to generate
identical _cgo_flags for every run.

The test for this is the cmd/go testsuite, to follow in a future patch.

Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]