mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Change BUILD compiler target to cc
The use of gcc explicitly does not work on systems where the local building system only has the clang compiler. Framebuffer was the only user of the BUILD_CC target for local tooling and its handling of flags was also improved.
This commit is contained in:
parent
8bca6cf28b
commit
40cdf498b9
2
Makefile
2
Makefile
@ -148,7 +148,7 @@ endif
|
|||||||
VQ=@
|
VQ=@
|
||||||
|
|
||||||
# Override this only if the host compiler is called something different
|
# Override this only if the host compiler is called something different
|
||||||
HOST_CC := gcc
|
BUILD_CC := cc
|
||||||
|
|
||||||
ifeq ($(TARGET),riscos)
|
ifeq ($(TARGET),riscos)
|
||||||
ifeq ($(HOST),riscos)
|
ifeq ($(HOST),riscos)
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
# Framebuffer target setup
|
# Framebuffer target setup
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
CFLAGS += -Dnsframebuffer
|
CFLAGS += -std=c99 -g \
|
||||||
|
-Dnsframebuffer -Dsmall
|
||||||
|
|
||||||
#resource path
|
#resource path
|
||||||
CFLAGS += '-DNETSURF_FB_RESPATH="$(NETSURF_FB_RESPATH)"'
|
CFLAGS += '-DNETSURF_FB_RESPATH="$(NETSURF_FB_RESPATH)"'
|
||||||
@ -20,11 +21,6 @@ CFLAGS += '-DNETSURF_FB_FONT_MONOSPACE_BOLD="$(NETSURF_FB_FONT_MONOSPACE_BOLD)"'
|
|||||||
CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
|
CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
|
||||||
CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
|
CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
|
||||||
|
|
||||||
CFLAGS += -std=c99 -g -Dsmall \
|
|
||||||
-D_BSD_SOURCE \
|
|
||||||
-D_DEFAULT_SOURCE \
|
|
||||||
-D_POSIX_C_SOURCE=200809L
|
|
||||||
|
|
||||||
LDFLAGS += -lm
|
LDFLAGS += -lm
|
||||||
|
|
||||||
# non optional pkg-configed libs
|
# non optional pkg-configed libs
|
||||||
@ -38,6 +34,19 @@ ifeq ($(NETSURF_FB_FONTLIB),freetype)
|
|||||||
LDFLAGS += $(shell freetype-config --libs)
|
LDFLAGS += $(shell freetype-config --libs)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# HOST specific feature flags
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# enable POSIX and XSI features.
|
||||||
|
# everywhere but freebsd where the default set already has them enabled
|
||||||
|
ifneq ($(HOST),FreeBSD)
|
||||||
|
CFLAGS += -D_POSIX_C_SOURCE=200809L \
|
||||||
|
-D_XOPEN_SOURCE=700 \
|
||||||
|
-D_BSD_SOURCE \
|
||||||
|
-D_DEFAULT_SOURCE \
|
||||||
|
-D_NETBSD_SOURCE
|
||||||
|
endif
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# built-in resource setup
|
# built-in resource setup
|
||||||
@ -81,11 +90,11 @@ FB_IMAGE_throbber8 := throbber/throbber8.png
|
|||||||
|
|
||||||
# local compiler flags
|
# local compiler flags
|
||||||
ifeq ($(HOST),OpenBSD)
|
ifeq ($(HOST),OpenBSD)
|
||||||
HOST_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng)
|
BUILD_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpng)
|
||||||
HOST_LDFLAGS += $(shell $(PKG_CONFIG) --libs libpng)
|
BUILD_LDFLAGS += $(shell $(PKG_CONFIG) --libs libpng)
|
||||||
else
|
else
|
||||||
HOST_CFLAGS +=
|
BUILD_CFLAGS +=
|
||||||
HOST_LDFLAGS += -lpng
|
BUILD_LDFLAGS += -lpng
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Host tool to convert image bitmaps to source code.
|
# Host tool to convert image bitmaps to source code.
|
||||||
@ -93,8 +102,8 @@ endif
|
|||||||
# convert_image dependd on fb_bitmap.h so that if we change that
|
# convert_image dependd on fb_bitmap.h so that if we change that
|
||||||
# header, we get new images built.
|
# header, we get new images built.
|
||||||
$(TOOLROOT)/convert_image: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/convert_image.c $(FRONTEND_SOURCE_DIR)/fbtk.h
|
$(TOOLROOT)/convert_image: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/convert_image.c $(FRONTEND_SOURCE_DIR)/fbtk.h
|
||||||
$(VQ)echo " HOST CC: $@"
|
$(VQ)echo "BUILD CC: $@"
|
||||||
$(Q)$(HOST_CC) $(HOST_CFLAGS) -o $@ $(FRONTEND_SOURCE_DIR)/convert_image.c $(HOST_LDFLAGS)
|
$(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $(FRONTEND_SOURCE_DIR)/convert_image.c $(BUILD_LDFLAGS)
|
||||||
|
|
||||||
# 1: input file
|
# 1: input file
|
||||||
# 2: output file
|
# 2: output file
|
||||||
@ -118,8 +127,8 @@ FB_FONT_internal_ns-sans := fonts/glyph_data
|
|||||||
|
|
||||||
# Internal font conversion
|
# Internal font conversion
|
||||||
$(TOOLROOT)/convert_font: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/convert_font.c
|
$(TOOLROOT)/convert_font: $(TOOLROOT)/created $(FRONTEND_SOURCE_DIR)/convert_font.c
|
||||||
$(VQ)echo " HOST CC: $@"
|
$(VQ)echo "BUILD CC: $@"
|
||||||
$(Q)$(HOST_CC) -o $@ $(FRONTEND_SOURCE_DIR)/convert_font.c
|
$(Q)$(BUILD_CC) -o $@ $(FRONTEND_SOURCE_DIR)/convert_font.c
|
||||||
|
|
||||||
# 1: input file
|
# 1: input file
|
||||||
# 2: output source code file
|
# 2: output source code file
|
||||||
|
Loading…
Reference in New Issue
Block a user