Index: lib/Driver/ToolChains/Fuchsia.cpp =================================================================== --- lib/Driver/ToolChains/Fuchsia.cpp +++ lib/Driver/ToolChains/Fuchsia.cpp @@ -65,8 +65,10 @@ if (Args.hasArg(options::OPT_r)) CmdArgs.push_back("-r"); - else + else { CmdArgs.push_back("--build-id"); + CmdArgs.push_back("--hash-style=gnu"); + } if (!Args.hasArg(options::OPT_static)) CmdArgs.push_back("--eh-frame-hdr"); Index: test/Driver/fuchsia.c =================================================================== --- test/Driver/fuchsia.c +++ test/Driver/fuchsia.c @@ -9,6 +9,7 @@ // CHECK: "--sysroot=[[SYSROOT]]" // CHECK: "-pie" // CHECK: "--build-id" +// CHECK: "--hash-style=gnu" // CHECK: "-dynamic-linker" "ld.so.1" // CHECK: Scrt1.o // CHECK-NOT: crti.o