Comments (4)
I have no particular preference, I just wanted to highlight that the advertised feature does not work at all. Based on NeLua's experience, it seems that most C compilers print to stdout when given -E
, but I've checked "retrocomputing" C compiles and it seems that the zcc wrapper from z88dk instead creates a .c.i
files, and cc65 creates a .i
file.
from gbdk-2020.
Sure, no problem to have lcc replace -c
with -E
for SDCC (when -E
is specified to lcc). (Similar to how -S
is handled)
Some implementation questions though:
-
Does the preferred resolution to this also include emitting the preprocessor output to:
- stdout?
- To a file (if specified with
-o
)? - Or gcc
-save-temps
like behavior where output is written to matching.i
files if requested?
-
If yes to
-o
support: with multiple source files specified what is it expected?
Right now:
- The output does not go to stdout
- It only goes to a temp file (that gets deleted) even with -o specified
- Output to
.i
files is suppressed (behavior inherited from the original code base)
With just allowing it to substitute -E
it looks like:
$ ../../../bin/lcc -E test.c
(shows no output in terminal)
With verbose on:
$ ../../../bin/lcc -v -E test.c
../../../bin/lcc $Id: lcc.c,v 2.0 2022/10/14 19:44:56 gbdk-2020 Exp $
"../../../"bin/sdcc -msm83 --no-std-crt0 --fsigned-char --use-stdout -D__PORT_sm83 -D__TARGET_gb -Wa-pogn -I"../../../"lib/gb -DINT_16_BITS -I"../../../"include -E test.c -o /tmp/lcc2393470.o
rm /tmp/lcc2393470.adb /tmp/lcc2393470.o /tmp/lcc2393470.asm /tmp/lcc2393470.lst /tmp/lcc2393470.sym
With verbose + output to a .i
file (blocked)
$ ../../../bin/lcc -v -E test.c -o test.i
../../../bin/lcc $Id: lcc.c,v 2.0 2022/10/14 19:44:56 gbdk-2020 Exp $
../../../bin/lcc: -o would overwrite test.i <-- (There is no actual test.i file to overwrite)
With verbose + output to a .temp
file:
$ $ ../../../bin/lcc -v -E test.c -o test.temp
../../../bin/lcc $Id: lcc.c,v 2.0 2022/10/14 19:44:56 gbdk-2020 Exp $
"../../../"bin/sdcc -msm83 --no-std-crt0 --fsigned-char --use-stdout -D__PORT_sm83 -D__TARGET_gb -Wa-pogn -I"../../../"lib/gb -DINT_16_BITS -I"../../../"include -E test.c -o /tmp/lcc2420180.o
rm /tmp/lcc2420180.adb /tmp/lcc2420180.o /tmp/lcc2420180.asm /tmp/lcc2420180.lst /tmp/lcc2420180.sym
from gbdk-2020.
When you have a moment please try out the changes in #426.
-E
- Goes to stdout by default (
.c
and.h
files only) - Adding
--save-preproc
will output to matching.i
files instead - Multiple files may be specified
- No lcc
-o
single output file is supported
- Goes to stdout by default (
A build is here if that's convenient:
https://github.com/gbdk-2020/gbdk-2020/actions/runs/3271632514
from gbdk-2020.
Works great, thank you!
from gbdk-2020.
Related Issues (20)
- Lack of crt0.lst in gbdk-lib installation prevents use of -u linker option HOT 8
- Bug: f_min font has capital 'U' remapped to 'K' on Z80 targets
- Change naming HOT 2
- Clarify various licenses used by GBDK-2020 HOT 30
- Makefile fails looking for GLIBC_2.29, gives "Error 2" HOT 1
- Broken links in documentation HOT 1
- Let png2asset accept list of files HOT 2
- Why background tiles displays randomly in the screen? HOT 1
- Include nixpkg derivation HOT 9
- lcc fails on casting anonymous function pointer HOT 3
- Test current sdcc (before 4.3.0 release) HOT 6
- Install on mac? HOT 3
- lcc unknown developer HOT 9
- 4.2 Release
- Unable To Compile HOT 3
- Pointer Error HOT 1
- Errors compiling on Windows with non-C:\ folder names that have spaces HOT 16
- mac installing
- Strip -p arg from mkdir in generated compile.bat files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gbdk-2020.