Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a503fb36 authored by Stephen Hines's avatar Stephen Hines
Browse files

PIE executables created with mingw use "mainCRTStartup" as their entry point.

Bug: 14416410

Our linker uses "start" as the primary entry point, so we need to adjust this
for mingw-based Windows compiles, or nothing will execute correctly.

Change-Id: I6e99f43e075ef9f00500099ce34ec4425c996454
parent 72f0cf56
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1414,6 +1414,10 @@ ifdef BUILD_HOST_static
HOST_FPIE_FLAGS :=
else
HOST_FPIE_FLAGS := -pie
# Force the correct entry point to workaround a bug in binutils that manifests with -pie
ifeq ($(HOST_OS),windows)
HOST_FPIE_FLAGS += -Wl,-e_mainCRTStartup
endif
endif

ifneq ($(HOST_CUSTOM_LD_COMMAND),true)