Commit d3d038c
sunxi-fel: find libfdt with pkg-config when available
sunxi-fel uses libfdt to parse FIT images, but the Makefile only
passed -lfdt when linking. That works when libfdt headers and libraries
are installed in default compiler search paths, but fails when a package
installs them elsewhere.
Use pkg-config to obtain the libfdt compiler and linker flags when a
libfdt.pc file is available. Keep the old empty CFLAGS and -lfdt
fallback for systems where libfdt is installed in default search paths
or packages do not provide pkg-config metadata.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>1 parent 4f144b3 commit d3d038c
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| |||
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
152 | | - | |
153 | | - | |
| 162 | + | |
| 163 | + | |
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
| |||
0 commit comments