Bug 7855

Summary: cpp should define __ELF__ if objformat = elf
Product: Base System Reporter: Don Croyle <croyle>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Don Croyle 1998-09-07 20:50:03 UTC
Cpp doesn't define __ELF__ when the object format is elf.  I don't
believe that anything in the core OS uses cpp, but I know at least one
port that cares about __ELF__ does (archivers/zip).

Fix: Since /usr/bin/cpp is a wrapper script, fixing it seems less intrusive
than grafting objformat's functionality into /usr/libexec/cpp.

This patch does that:
How-To-Repeat: On a system where the default object format is elf:

touch foo.c
cc -E -dM foo.c
cpp -dM foo.c

Note the __ELF__ is listed in the former but not the latter output.
Comment 1 Don Croyle 1999-07-08 08:53:17 UTC
Someone what to close this?  It has long since been overtaken by
events and bde hated the idea when someone else suggested it.
-- 
I've always wanted to be a dilettante, but I've never quite been ready
to make the commitment.
Comment 2 hoek freebsd_committer freebsd_triage 1999-08-22 03:09:26 UTC
State Changed
From-To: open->closed

cpp should define no more than absolutely necessary.  Originator reportrts 
that his suggestion has long since been overtaken by events.  Originator 
reports that bde also hated his suggestion.  Originator confirms closure.