Summary: Built-in rule for preprocessing assembler programs
doesn't work as documented
                 Project: make
            Submitted by: outputenable
            Submitted on: Sat 08 May 2021 12:27:20 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2.1
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None




I'd like to report a mismatch between documentation and implementation in GNU
Make 4.2.1 on (Debian 10 "buster") Linux.

The manual states in 10.2 Catalogue of Built-in Rules
that "n.s is made automatically from n.S by running the C preprocessor, cpp.
The precise recipe is ‘$(CPP) $(CPPFLAGS)’" (under Assembling and
preprocessing assembler programs).  Now in actuality what gets executed is
'$(CC) -E $< > $@' though.  To reproduce:

$ touch demo.S
$ make CPP=true CC=false demo.s
false -E  demo.S > demo.s

I expect something like 'true demo.S > demo.s' instead (but '$(CC) -E' is
apparently also the default value of CPP).  The observed behavior is reflected
in the source code as well if I'm not mistaken:


which IIUC basically says that the recipe for ".S.s" is "$(CC) -E $(CPPFLAGS)
$< > $@"---contradicting the manual.  This is also still in master.

Thanks and regards

$ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu


Reply to this item at:


  Message sent via Savannah

Reply via email to