[bug #59096] The built in rule for archives fails on aix.

2020-09-10 Thread Dmitry Goncharov
Follow-up Comment #1, bug #59096 (project make):

This is a patch which fixes this rule.

diff --git a/src/default.c b/src/default.c
index 751ea15..7d31355 100644
--- a/src/default.c
+++ b/src/default.c
@@ -71,6 +71,9 @@ static struct pspec default_pattern_rules[] =

 #else
 { "(%)", "%",
+#ifdef _AIX
+"OBJECT_MODE=any "
+#endif
 "$(AR) $(ARFLAGS) $@ $<" },
 #endif
 /* The X.out rules are only in BSD's default set because


___

Reply to this item at:

  

___
  Сообщение отправлено по Savannah
  https://savannah.gnu.org/




[bug #59096] The built in rule for archives fails on aix.

2020-09-10 Thread Dmitry Goncharov
URL:
  

 Summary: The built in rule for archives fails on aix.
 Project: make
Submitted by: dgoncharov
Submitted on: Чт 10 сен 2020 23:40:31
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: None
Operating System: None
   Fixed Release: None
   Triage Status: None

___

Details:

$ cat makefile
all: libhello.a(a.o)
%.o: %.c
$(CC) -c -maix64 $<
a.c:
echo 'static int a;' >$@
$
$ make
gcc -c -maix64 a.c
ar rv libhello.a a.o
ar: Creating an archive file libhello.a.
a - a.o
ar: 0707-126 a.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
: recipe for target 'libhello.a(a.o)' failed
make: *** [libhello.a(a.o)] Error 1
rm a.o
$

Aix ar requires an option to specify the object file format.

Quote from
https://www.ibm.com/support/knowledgecenter/ssw_aix_72/a_commands/ar.html


"-X modeSpecifies the type of object file ar should examine. The mode 
must be
one of the following:
32
Processes only 32-bit object files
64
Processes only 64-bit object files
32_64
Processes both 32-bit and 64-bit object files
d64
Examines discontinued 64-bit XCOFF files (magic number == U803XTOCMAGIC).
any
Processes all of the supported object files.
The default is to process 32-bit object files (ignore 64-bit objects). The
mode can also be set with the OBJECT_MODE environment variable. For example,
OBJECT_MODE=64 causes ar to process any 64-bit objects and ignore 32-bit
objects. The -X flag overrides the OBJECT_MODE variable."






___

Reply to this item at:

  

___
  Сообщение отправлено по Savannah
  https://savannah.gnu.org/




[bug #59093] Segmentation fault regression in make 4.3 vs. 4.2.1

2020-09-10 Thread Thomas Petazzoni
URL:
  

 Summary: Segmentation fault regression in make 4.3 vs. 4.2.1
 Project: make
Submitted by: tpetazzoni
Submitted on: Thu 10 Sep 2020 03:35:12 PM UTC
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
   Component Version: None
Operating System: None
   Fixed Release: None
   Triage Status: None

___

Details:

GNU Make has a segmentation fault regression in make 4.3, where the exact same
make code works fine with make 4.2.1.

The stack trace looks like this:

Program received signal SIGSEGV, Segmentation fault.
0x55e0fca8530d in func_filter_filterout (o=0x55e10693b400 "",
argv=, funcname=)
at ../../src/function.c:1014
1014../../src/function.c: No such file or directory.
(gdb) 
(gdb) bt
#0  0x55e0fca8530d in func_filter_filterout (o=0x55e10693b400 "",
argv=, funcname=)
at ../../src/function.c:1014
#1  0x55e0fca86261 in handle_function (op=op@entry=0x7fff1e9c2e70,
stringp=stringp@entry=0x7fff1e9c2e68)
at ../../src/function.c:2544
#2  0x55e0fca7fe2f in variable_expand_string (line=,
line@entry=0x0, string=, 
length=length@entry=18446744073709551615) at ../../src/expand.c:258
#3  0x55e0fca7fc16 in variable_expand (line=) at
../../src/expand.c:566
#4  variable_expand_for_file (file=0x0, line=) at
../../src/expand.c:464
#5  variable_expand_for_file (file=0x0, line=) at
../../src/expand.c:457
#6  allocated_variable_expand_for_file (file=0x0, line=) at
../../src/expand.c:566
#7  expand_argument (str=0x55e106978b98 "$(filter $(VARS),$(.VARIABLES)))",
end=end@entry=0x55e106978bb7 ")")
at ../../src/expand.c:446
#8  0x55e0fca8639c in handle_function (op=op@entry=0x7fff1e9c3040,
stringp=stringp@entry=0x7fff1e9c3038)
at ../../src/function.c:2512
#9  0x55e0fca7fe2f in variable_expand_string (line=,
line@entry=0x0, 
string=string@entry=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))", 
length=length@entry=18446744073709551615) at ../../src/expand.c:258
#10 0x55e0fca7fc7a in variable_expand (line=0x55e1069cfbb2 " $(sort
$(filter $(VARS),$(.VARIABLES)))")
at ../../src/expand.c:566
#11 variable_expand_for_file (file=0x0, line=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))")
at ../../src/expand.c:464
#12 variable_expand_for_file (file=0x0, line=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))")
at ../../src/expand.c:457
#13 allocated_variable_expand_for_file (file=0x0, line=0x55e1069cfbb2 " $(sort
$(filter $(VARS),$(.VARIABLES)))")
at ../../src/expand.c:566
#14 expand_argument (str=0x55e1069cfbb2 " $(sort $(filter
$(VARS),$(.VARIABLES)))", end=end@entry=0x0)
at ../../src/expand.c:436
#15 0x55e0fca83fb1 in func_foreach (o=0x55e10693a830 "",
argv=0x7fff1e9c3150, funcname=)
at ../../src/function.c:868
#16 0x55e0fca86261 in handle_function (op=op@entry=0x7fff1e9c32c0,
stringp=stringp@entry=0x7fff1e9c32b8)
at ../../src/function.c:2544
#17 0x55e0fca7fe2f in variable_expand_string (line=,
line@entry=0x0, string=, 
length=length@entry=18446744073709551615) at ../../src/expand.c:258
#18 0x55e0fca80792 in variable_expand (line=) at
../../src/expand.c:475
#19 variable_expand_for_file (line=, file=) at
../../src/expand.c:475
#20 0x55e0fca807f4 in allocated_variable_expand_for_file (line=, file=file@entry=0x55e0fe9d4280)
at ../../src/expand.c:566
#21 0x55e0fca8bc75 in new_job (file=0x55e0fe9d4280) at
../../src/job.c:1808
#22 0x55e0fca9746c in remake_file (file=0x55e0fe9d4280) at
../../src/remake.c:1234
#23 update_file_1 (depth=, file=0x55e0fe9d4280) at
../../src/remake.c:835
#24 update_file (file=file@entry=0x55e0fe9d4280, depth=) at
../../src/remake.c:336
#25 0x55e0fca97dc4 in update_goal_chain (goaldeps=) at
../../src/remake.c:151
#26 0x55e0fca7bf25 in main (argc=, argv=,
envp=)
at ../../src/main.c:2589

To reproduce:

$ git clone https://github.com/buildroot/buildroot.git
$ cd buildroot
$ make BR2_HAVE_DOT_CONFIG=y -s printvars VARS=%_LICENSE

Works with make 4.2.1 (and produces the expected output), segfaults with make
4.3 (with the above stack trace captured using gdb).




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/