Ticket #3869: t3869_BuildError.diff

File t3869_BuildError.diff, 1.7 KB (added by bb, 8 years ago)
  • build/premake/premake4.lua

     
    282282
    283283                if os.is("linux") or os.is("bsd") then
    284284                    linkoptions { "-Wl,--no-undefined", "-Wl,--as-needed" }
     285                    buildoptions { "-fPIC" }
    285286                end
    286287
    287288                if arch == "x86" then
     
    369370        if os.is("linux") or os.is("bsd") then
    370371            -- To use our local shared libraries, they need to be found in the
    371372            -- runtime dynamic linker path. Add their path to -rpath.
     373            buildoptions { "-fPIC" }
    372374            if _OPTIONS["libdir"] then
    373375                linkoptions {"-Wl,-rpath," .. _OPTIONS["libdir"] }
    374376            else
     
    845847    end
    846848   
    847849    if os.is("linux") then
     850        buildoptions { "-fPIC" }
    848851        if _OPTIONS["android"] then
    849852            table.insert(source_dirs, "lib/sysdep/os/android")
    850853        else
     
    978981        project_add_manifest()
    979982
    980983    elseif os.is("linux") or os.is("bsd") then
    981 
     984        buildoptions { "-fPIC" }
    982985        if not _OPTIONS["android"] and not (os.getversion().description == "OpenBSD") then
    983986            links { "rt" }
    984987        end
     
    12311234        -- (TODO: It'd be nice to fix FCollada, but that looks hard)
    12321235        buildoptions { "-fno-strict-aliasing" }
    12331236
    1234         buildoptions { "-rdynamic" }
     1237        buildoptions { "-rdynamic", "-fPIC" }
    12351238        linkoptions { "-rdynamic" }
    1236 
    12371239    elseif os.is("bsd") then
    12381240        if os.getversion().description == "OpenBSD" then
    12391241            links { "c", }
     
    14221424        project_add_manifest()
    14231425
    14241426    elseif os.is("linux") or os.is("bsd") then
    1425 
     1427        buildoptions { "-fPIC" }
    14261428        if not _OPTIONS["android"] and not (os.getversion().description == "OpenBSD") then
    14271429            links { "rt" }
    14281430        end