void-packages/srcpkgs/quickjs/patches/cross.patch

30 lines
1.0 KiB
Diff

--- a/Makefile
+++ b/Makefile
@@ -197,7 +197,7 @@ ifneq ($(CROSS_PREFIX),)
$(QJSC): $(OBJDIR)/qjsc.host.o \
$(patsubst %.o, %.host.o, $(QJS_LIB_OBJS))
- $(HOST_CC) $(LDFLAGS) -o $@ $^ $(HOST_LIBS)
+ $(HOST_CC) $(BUILD_LDFLAGS) -o $@ $^ $(HOST_LIBS)
endif #CROSS_PREFIX
@@ -263,7 +263,7 @@ $(OBJDIR)/%.o: %.c | $(OBJDIR)
$(CC) $(CFLAGS_OPT) -c -o $@ $<
$(OBJDIR)/%.host.o: %.c | $(OBJDIR)
- $(HOST_CC) $(CFLAGS_OPT) -c -o $@ $<
+ $(HOST_CC) $(BUILD_CFLAGS) -c -o $@ $<
$(OBJDIR)/%.pic.o: %.c | $(OBJDIR)
$(CC) $(CFLAGS_OPT) -fPIC -DJS_SHARED_LIBRARY -c -o $@ $<
@@ -287,7 +287,7 @@ regexp_test: libregexp.c libunicode.c cu
$(CC) $(LDFLAGS) $(CFLAGS) -DTEST -o $@ libregexp.c libunicode.c cutils.c $(LIBS)
unicode_gen: $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o libunicode.c unicode_gen_def.h
- $(HOST_CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o
+ $(HOST_CC) $(BUILD_LDFLAGS) $(BUILD_CFLAGS) -o $@ $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o
clean:
rm -f repl.c qjscalc.c out.c