Add late static libraries for libgcc

libgcc has to be last on the command line, after -lc for libc.

Change-Id: I5c867cef59ca84e23ff5cea406da3ec3f261aa76
This commit is contained in:
Colin Cross
2015-03-16 16:15:49 -07:00
parent 13af54da2d
commit 77b00fa6f1
2 changed files with 19 additions and 11 deletions

View File

@@ -184,8 +184,8 @@ func TransformObjToStaticLib(ctx common.AndroidModuleContext, objFiles []string,
// Generate a rule for compiling multiple .o files, plus static libraries, whole static libraries,
// and shared libraires, to a shared library (.so) or dynamic executable
func TransformObjToDynamicBinary(ctx common.AndroidModuleContext,
objFiles, sharedLibs, staticLibs, wholeStaticLibs []string, crtBegin, crtEnd string,
flags builderFlags, outputFile string) {
objFiles, sharedLibs, staticLibs, lateStaticLibs, wholeStaticLibs []string,
crtBegin, crtEnd string, flags builderFlags, outputFile string) {
var ldCmd string
if flags.clang {
@@ -218,6 +218,8 @@ func TransformObjToDynamicBinary(ctx common.AndroidModuleContext,
ldDirs = append(ldDirs, dir)
}
libFlagsList = append(libFlagsList, lateStaticLibs...)
deps := []string{ldCmd}
deps = append(deps, sharedLibs...)
deps = append(deps, staticLibs...)