Use the cross objcopy and strip, build the bootstrap, pngtoh and pngtoraw helpers with the build host compiler. diff -Nrup a/cinelerra/Makefile b/cinelerra/Makefile --- a/cinelerra/Makefile 2026-02-01 21:31:43.000000000 +0100 +++ b/cinelerra/Makefile 2026-10-22 17:22:55.778738373 +0200 @@ -546,18 +546,18 @@ all: $(OUTPUT) $(CUTADS) $(BDWRITE) $(LV # Also VFS only overrides the C library when dynamic linking is used. $(OUTPUT): $(OBJS) $(THEME_DATA) $(DCRAW) $(LIBRARIES) $(LINKER) `cat $(OBJDIR)/objs` - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G)) - $(if $(findstring -g,$(CFLAGS)),objcopy --add-gnu-debuglink=$(OUTPUT_G) $(OUTPUT)) - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT)) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --only-keep-debug $(OUTPUT) $(OUTPUT_G)) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --add-gnu-debuglink=$(OUTPUT_G) $(OUTPUT)) + $(if $(findstring -ggdb,$(CFLAGS)),,$(STRIP) $(OUTPUT)) ln -f -s ../bin/$(WANT_CIN) ci ifneq ($(WANT_COMMERCIAL),no) $(CUTADS): $(CUTOBJS) $(CUTLIBS) $(LIBRARIES) @echo $(CXX) -o $@ $(CUTOBJS) @$(CXX) $(CFLAGS) -pthread -o $@ $(CUTOBJS) $(CUTLIBS) $(LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(CUTADS) $(CUTADS).debuginfo) - $(if $(findstring -g,$(CFLAGS)),objcopy --add-gnu-debuglink=$(CUTADS).debuginfo $(CUTADS)) - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(CUTADS)) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --only-keep-debug $(CUTADS) $(CUTADS).debuginfo) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --add-gnu-debuglink=$(CUTADS).debuginfo $(CUTADS)) + $(if $(findstring -ggdb,$(CFLAGS)),,$(STRIP) $(CUTADS)) install-cutads: cp -av $(OBJDIR)/cutads $(BINDIR)/. @@ -568,8 +568,8 @@ endif $(BDWRITE): $(BDWOBJS) $(LIBRARIES) @echo $(CXX) -o $@ $(BDWOBJS) @$(CXX) $(CFLAGS) -pthread -o $@ $(BDWOBJS) $(LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo) - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(BDWRITE)) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --only-keep-debug $(BDWRITE) $(BDWRITE).debuginfo) + $(if $(findstring -ggdb,$(CFLAGS)),,$(STRIP) $(BDWRITE)) install-bdwrite: cp -av $(OBJDIR)/bdwrite $(BINDIR)/. @@ -613,8 +613,8 @@ $(OBJDIR)/pluginlv2ui.o $(OBJDIR)/lv2ui. $(OBJDIR)/lv2ui: $(LV2OBJS) @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@ @$(CXX) `cat $(OBJDIR)/c_flags` $^ -o $@ $(LIBS) $(LV2_LIBS) $(GTK2_LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(LV2UI) $(LV2UI).debuginfo) - $(if $(findstring -ggdb,$(CFLAGS)),,strip $(LV2UI)) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --only-keep-debug $(LV2UI) $(LV2UI).debuginfo) + $(if $(findstring -ggdb,$(CFLAGS)),,$(STRIP) $(LV2UI)) .PHONY: lv2ui lv2ui: $(LV2UI) diff -Nrup a/guicast/Makefile b/guicast/Makefile --- a/guicast/Makefile 2026-02-01 21:31:43.000000000 +0100 +++ b/guicast/Makefile 2026-10-22 17:22:55.781279066 +0200 @@ -2,54 +2,54 @@ export TOPDIR ?= $(CURDIR)/.. include $(TOPDIR)/global_config ifeq ($(OBJDIR), i686) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf32-i386\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B i386 -I binary -O elf32-i386\"" endif ifeq ($(OBJDIR), i386) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf32-i386\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B i386 -I binary -O elf32-i386\"" endif ifeq ($(OBJDIR), x86_64) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B i386 -I binary -O elf64-x86-64\"" endif ifeq ($(OBJDIR), amd64) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf64-x86-64\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B i386 -I binary -O elf64-x86-64\"" endif ifeq ($(OBJDIR), armv8l) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf32-littlearm\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B arm -I binary -O elf32-littlearm\"" endif ifeq ($(OBJDIR), armv7l) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B arm -I binary -O elf32-littlearm\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B arm -I binary -O elf32-littlearm\"" endif ifeq ($(OBJDIR), aarch64) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B aarch64 -I binary -O elf64-littleaarch64\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64\"" endif ifeq ($(OBJDIR), ppc64) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf64-powerpc\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B powerpc -I binary -O elf64-powerpc\"" endif ifeq ($(OBJDIR), ppc64le) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf64-powerpcle\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B powerpc -I binary -O elf64-powerpcle\"" endif ifeq ($(OBJDIR), ppc) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf32-powerpc\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B powerpc -I binary -O elf32-powerpc\"" endif ifeq ($(OBJDIR), sparc) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B sparc -I binary -O elf32-sparc\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B sparc -I binary -O elf32-sparc\"" endif ifeq ($(OBJDIR), sparc64) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B sparc -I binary -O elf32-sparc64\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B sparc -I binary -O elf32-sparc64\"" endif ifeq ($(OBJDIR), parisc) -BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B hppa -I binary -O elf32-hppa\"" +BOOTSTRAPFLAGS := -DBOOTSTRAP="\"$(OBJCOPY) -B hppa -I binary -O elf32-hppa\"" endif @@ -161,16 +161,16 @@ $(OUTPUT): $(OBJS) $(BCXFER) ar rs $(OUTPUT) `ls -1 $(dir $(BCXFER))/xfer*.o` $(OBJDIR)/bootstrap: - $(CC) -O0 -g $(BOOTSTRAPFLAGS) -Wcast-align bootstrap.c -o $(OBJDIR)/bootstrap + $(HOSTCC) -O0 -g $(BOOTSTRAPFLAGS) -Wcast-align bootstrap.c -o $(OBJDIR)/bootstrap $(OBJDIR)/pngtoh: pngtoh.c - $(CC) -O2 pngtoh.c -o $(OBJDIR)/pngtoh + $(HOSTCC) -O2 pngtoh.c -o $(OBJDIR)/pngtoh PNGTORAWFLAGS = $(shell pkg-config --libs libpng pkg-config --cflags libpng) $(OBJDIR)/pngtoraw: pngtoraw.c - $(CC) -O2 pngtoraw.c -o $(OBJDIR)/pngtoraw $(PNGTORAWFLAGS) -lz + $(HOSTCC) -O2 pngtoraw.c -o $(OBJDIR)/pngtoraw $(PNGTORAWFLAGS) -lz clean: rm -rf $(OBJDIR) diff -Nrup a/mpeg2enc/Makefile b/mpeg2enc/Makefile --- a/mpeg2enc/Makefile 2026-02-01 21:31:43.000000000 +0100 +++ b/mpeg2enc/Makefile 2026-10-22 17:22:55.779948132 +0200 @@ -73,8 +73,8 @@ $(shell echo $(HVEG2LIB) $(OBJ) $(NASMO $(HVEG2ENC): $(OBJDIR)/hveg2enc.o $(HVEG2LIB) $(CXX) `cat $(OBJDIR)/c_flags` -o $@ $^ $(LIBS) - $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(HVEG2ENC) $(HVEG2ENC_G)) - strip $(HVEG2ENC) + $(if $(findstring -g,$(CFLAGS)),$(OBJCOPY) --only-keep-debug $(HVEG2ENC) $(HVEG2ENC_G)) + $(STRIP) $(HVEG2ENC) $(OBJDIR)/hveg2enc.o: mpeg2enc.c $(CC) -c `cat $(OBJDIR)/c_flags` -Dmpeg2enc=main -o $@ $^