From 2b9a03d961ef35befebfa098a76f3f3c99116cb4 Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Thu, 15 Aug 2019 21:32:21 -0400 Subject: [PATCH] Set BUILDMODE=static and -fPIC in Makefile --- build.rs | 2 +- etc/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 7c4c6f9..59b6768 100644 --- a/build.rs +++ b/build.rs @@ -27,7 +27,6 @@ fn main() { let mut copy_options = CopyOptions::new(); copy_options.overwrite = true; dir::copy(&luajit_dir, &out_dir, ©_options).unwrap(); - fs::copy(format!("etc/Makefile"), format!("{}/Makefile", &src_dir)).unwrap(); let mut buildcmd = Command::new(msvcbuild_bat); for (name, value) in cl_exe.env() { @@ -58,6 +57,7 @@ fn main() { let mut copy_options = CopyOptions::new(); copy_options.overwrite = true; dir::copy(&luajit_dir, &out_dir, ©_options).unwrap(); + fs::copy(format!("etc/Makefile"), format!("{}/Makefile", &src_dir)).unwrap(); let mut buildcmd = Command::new("make"); buildcmd.current_dir(&src_dir); diff --git a/etc/Makefile b/etc/Makefile index 8f3cf60..04a7dd2 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -207,7 +207,7 @@ HOST_ACFLAGS= $(CCOPTIONS) $(HOST_XCFLAGS) $(TARGET_ARCH) $(HOST_CFLAGS) HOST_ALDFLAGS= $(LDOPTIONS) $(HOST_XLDFLAGS) $(HOST_LDFLAGS) HOST_ALIBS= $(HOST_XLIBS) $(LIBS) $(HOST_LIBS) -STATIC_CC = $(CROSS)$(CC) +STATIC_CC = $(CROSS)$(CC) -fPIC DYNAMIC_CC = $(CROSS)$(CC) -fPIC TARGET_CC= $(STATIC_CC) TARGET_STCC= $(STATIC_CC)