bugmake - Bugs: bug #60557, Built-in rule for preprocessing...

 
 

bug #60557: Built-in rule for preprocessing assembler programs doesn't work as documented

Submitter:  Oliver Ebert <outputenable>
Submitted:  Sat 08 May 2021 12:27:20 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.2.1 Operating System:  Any
Fixed Release:  4.4 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 07 Sep 2021 12:44:31 AM UTC, comment #2: 

I fixed the default value of PREPROCESS.S to match the documentation.

Thanks for reporting this!

Paul D. Smith <psmith>
Group administrator
Sun 09 May 2021 08:19:22 PM UTC, comment #1: 

I thought I'd found where PREPROCESS.S was added, in 2014, under:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=c0380823a27f14cdc8274ad03c0dcab216d1380b

... but I must be getting confused by the limited diff context because it's there all the way back to 1992's initial revision:

https://git.savannah.gnu.org/cgit/make.git/commit/?id=b8593206069f19229dfb8f41233ea61d891ad6e4

The definition of CPP as $(CC) -E also goes back to 1992.  The claim in the documentation that we use $(CPP) goes back to 1991.  The documentation's approach seems reasonable.  Perhaps the PREPROCESS.S definition got confused by the since-retired Xenix condition.

Martin Dorey <mdorey>
Sat 08 May 2021 12:27:20 PM UTC, original submission:  

Hello,

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
Oliver

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

Oliver Ebert <outputenable>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by mdorey (Posted a comment)
  • -email is unavailable- added by outputenable (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-07 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Operating SystemPOSIX-Based Any
        Fixed ReleaseNone 4.4
        Triage StatusNone Small Effort

    Back to the top

    Powered by Savane 3.14-fc07.
    Corresponding source code