X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 2002:a05:620a:785:: with SMTP id 5mr661594qka.356.1588305208277; Thu, 30 Apr 2020 20:53:28 -0700 (PDT) X-Received: by 2002:a25:cad6:: with SMTP id a205mr3147140ybg.377.1588305208079; Thu, 30 Apr 2020 20:53:28 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Thu, 30 Apr 2020 20:53:27 -0700 (PDT) Complaints-To: groups-abuse AT google DOT com Injection-Info: google-groups.googlegroups.com; posting-host=89.177.32.144; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp NNTP-Posting-Host: 89.177.32.144 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Make 4.3 crash when compiling 86duino example under WXP-NTVDM From: "RayeR (rayer314 AT gmail DOT com) [via djgpp AT delorie DOT com]" Injection-Date: Fri, 01 May 2020 03:53:28 +0000 Content-Type: text/plain; charset="UTF-8" Bytes: 4628 Lines: 108 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I just found a strange behavior of new make 4.3 when compiling 86duino example under WXP-NTVDM i got crash: N:\86DUINO.SDK\EXAMPLE>make -v GNU Make 4.3 (DJGPP port (r1)) Built for i786-pc-msdosdjgpp Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. N:\86DUINO.SDK\EXAMPLE>make make -C N:\86DUINO.SDK\core memblockpnxt: memory fouled Exiting due to signal SIGABRT Raised at eip=0003b3dc eax=000d9440 ebx=00000120 ecx=00000000 edx=00000000 esi=000524c8 edi=00000000 ebp=000d94f8 esp=000d9430 program=E:\DJGPP\BIN\make.exe cs: sel=01ff base=02b00000 limit=0010ffff ds: sel=0207 base=02b00000 limit=0010ffff es: sel=0207 base=02b00000 limit=0010ffff fs: sel=01d7 base=0000ece0 limit=0000ffff gs: sel=0217 base=00000000 limit=0010ffff ss: sel=0207 base=02b00000 limit=0010ffff App stack: [000daa50..0005aa50] Exceptn stack: [0005a96c..00058a2c] Call frame traceback EIPs: 0x0003b32b 0x0003b3dc 0x0002b250 0x0002b4ac 0x00025b5e 0x00026661 0x0001a8eb 0x00009f92 0x0000afe3 0x0000b290 0x000058a7 0x00005d93 0x00005e5a 0x0002329b 0x00023b4b 0x0001b49e 0x0001d266 0x0001d569 0x000159de 0x000343e4 make: *** [Makefile:30: libcore.a] Error -1 When I revert to older Make 4.1 (11.7.2015) it compiles without problem. N:\86DUINO.SDK\EXAMPLE>make -v GNU Make 4.1 (DJGPP port (r1)) Built for i786-pc-msdosdjgpp Copyright (C) 1988-2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. N:\86DUINO.SDK\EXAMPLE>make make -C N:\86DUINO.SDK\core make.exe[1]: Entering directory 'n:/86duino.sdk/core' make.exe[1]: Nothing to be done for 'everything'. make.exe[1]: Leaving directory 'n:/86duino.sdk/core' gcc -c -w -g -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe -statics -O1 -DARDUINO=158 -D_86DUINO=210 example.cpp -o example.o -IN:\86DUINO. SDK\core -IN:\86DUINO.SDK\libraries\TimerOne gcc -w -Wl,--gc-sections -O1 -Wl,--start-group example.o N:\86DUINO.SDK\core\lib core.a N:\86DUINO.SDK\core\86Duino_Init.o -lTimerOne -lstdcxx -Wl,--end-group - o 86DUINO.exe -LN:\86DUINO.SDK\libraries\TimerOne The Makefile (compiling just one example.cpp): CC := gcc CFLAGS := -c -w -g -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -O1 -DARDUINO=158 -D_86DUINO=210 LINK_FLAGS := -w -Wl,--gc-sections -O1 LIB_PATH := $(86DUINO_DIR)\core LIB_INCLUDE := -I$(86DUINO_DIR)\core LIB := libcore.a INIT_OBJS := 86Duino_Init.o THIRD_LIB_NAME := TimerOne THIRD_LIB_INCLUDE := $(addprefix -I$(86DUINO_DIR)\libraries\,$(THIRD_LIB_NAME)) THIRD_LIB_PATH := $(addprefix -L$(86DUINO_DIR)\libraries\,$(THIRD_LIB_NAME)) THIRD_LIB := $(addprefix -l,$(THIRD_LIB_NAME)) EXTEN_LIB := SRCS := $(wildcard *.cpp) OBJS := $(patsubst %cpp,%o,$(SRCS)) TARGETS := 86DUINO.exe .PHONY : everything clean all $(LIB) everything: $(LIB) $(TARGETS) clean: rm $(OBJS) $(TARGETS) all: clean everything $(LIB): make -C $(LIB_PATH) $(TARGETS): $(OBJS) $(LIB_PATH)\$(LIB) $(LIB_PATH)\$(INIT_OBJS) $(CC) $(LINK_FLAGS) -Wl,--start-group $^ $(THIRD_LIB) $(EXTEN_LIB) -lstdcxx -Wl,--end-group -o $@ $(THIRD_LIB_PATH) %.o: %.cpp $(CC) $(CFLAGS) $< -o $@ $(LIB_INCLUDE) $(THIRD_LIB_INCLUDE)