Commit 8ffc0249 authored by Marcus von Appen's avatar Marcus von Appen
Browse files

- Let the build environment decide about the toolchain to be used, in case

  there are special tweaks and paths to be considered. Just provide some
  defaults, in case the values are undefined.
- py-version.sh does not need any bash specific features.
- Use libdl only on Linux for now. FreeBSD provides dl*() calls from libc.
parent c61be8e1
...@@ -42,14 +42,14 @@ ECHO = @echo ...@@ -42,14 +42,14 @@ ECHO = @echo
CP = cp CP = cp
MKDIR = mkdir MKDIR = mkdir
SED = sed SED = sed
PYTHON = python PYTHON ?= python
AS = $(CROSS_COMPILE)as AS ?= $(CROSS_COMPILE)as
CC = $(CROSS_COMPILE)gcc CC ?= $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld LD ?= $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY ?= $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size SIZE ?= $(CROSS_COMPILE)size
STRIP = $(CROSS_COMPILE)strip STRIP ?= $(CROSS_COMPILE)strip
all: all:
.PHONY: all .PHONY: all
......
#!/bin/bash #!/bin/sh
# Note: git describe doesn't work if no tag is available # Note: git describe doesn't work if no tag is available
git_tag="$(git describe --dirty --always)" git_tag="$(git describe --dirty --always)"
......
...@@ -48,7 +48,10 @@ ifeq ($(MICROPY_PY_FFI),1) ...@@ -48,7 +48,10 @@ ifeq ($(MICROPY_PY_FFI),1)
LIBFFI_LDFLAGS_MOD := $(shell pkg-config --libs libffi) LIBFFI_LDFLAGS_MOD := $(shell pkg-config --libs libffi)
LIBFFI_CFLAGS_MOD := $(shell pkg-config --cflags libffi) LIBFFI_CFLAGS_MOD := $(shell pkg-config --cflags libffi)
CFLAGS_MOD += $(LIBFFI_CFLAGS_MOD) -DMICROPY_PY_FFI=1 CFLAGS_MOD += $(LIBFFI_CFLAGS_MOD) -DMICROPY_PY_FFI=1
LDFLAGS_MOD += -ldl $(LIBFFI_LDFLAGS_MOD) ifeq ($(UNAME_S),Linux)
LDFLAGS_MOD += -ldl
endif
LDFLAGS_MOD += $(LIBFFI_LDFLAGS_MOD)
SRC_MOD += modffi.c SRC_MOD += modffi.c
endif endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment