Comments (6)
You're overriding CFLAGS
, killing the DEFINES
that would normally get passed from our Makefile, e.g. https://github.com/linux-sunxi/sunxi-tools/blob/v1.4.1/Makefile#L25-L27. The absence of -D_BSD_SOURCE
then cripples portable_endian.h.
If you wish to pass additional CFLAGS, you should preferably use EXTRA_CFLAGS
instead.
Regards, NiteHawk
from sunxi-tools.
I would say that we should use CFLAGS for passing additional options (instead of inventing EXTRA_CFLAGS), because it's a common practice used by all build systems. Or at least by autotools and CMake.
It is generally a good idea to follow the principle of least astonishment :)
from sunxi-tools.
How do we ensure we get our required flags in? Add whatever we need on top of existing CFLAGS - e.g. CFLAGS += -D_BSD_SOURCE
-, or pass them independently in the Makefile rules?
Additionally: Who's supposed to "win" in case of conflicts, e.g. -g
vs. -s
, -O0
vs. -O2
etc. ?
from sunxi-tools.
Maybe introduce a new DEFAULT_CFLAGS variable in the makefile? Then append the user supplied CFLAGS variable to it. The user's CFLAGS should have the highest priority and the power to override the default options (for example, providing -O3
option to override the default -O2
). Again, this is the way how the other build systems work.
from sunxi-tools.
Yes, that seems reasonable.
from sunxi-tools.
Some information about CFLAGS: https://www.gnu.org/software/automake/manual/html_node/User-Variables.html
from sunxi-tools.
Related Issues (20)
- Error: nand-part.c:93:4: warning: โstrncpyโ output truncated before terminating nul copying 8 bytes from a string of the same length
- usb_bulk_send() ERROR -7: Operation timed out on Raspberry PI 3 B+ HOT 2
- Re-implement the FEL tool, support RISC-V D1/F133 chip, support burning spi nor flash and spi nand flash HOT 1
- sunxi-fexc does not work on Allwinner D1 binaries HOT 1
- sunxi-fexc: Section name check too stringent HOT 3
- Error: unknown or unhandled Soc: 0x1667 on Allwinner A33 device HOT 1
- T113 burn packed image? HOT 3
- Fit image introduction breaks building for windows HOT 3
- usb_bulk_send() ERROR -7: Operation timed out on H616 HOT 4
- website is down HOT 1
- a global-buffer-overflow bug was discovered in bin2fex
- a memory leak was discovered in bin2fex
- A SEGV fault was discovered in bin2fex
- portable_endian.h not found? HOT 5
- Lacking support for A50 chipset HOT 8
- fatal error: sys/mman.h: No such file or directory HOT 8
- Box is only detected during first seconds of power on HOT 4
- sunxi-meminfo: kernel too old HOT 6
- Installing on macOS HOT 3
- A133 support HOT 2
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 sunxi-tools.