-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
building the latest trunk on MacOS 10.9 #583
Comments
It appears you didn't re-run bootstrap after pulling new changes from the trunk. As to the second part - could you explain what was the problem? The solution is incorrect for at least BSD - this makes it print access time instead of access permissions. Judging from macos manpage for stat(1) [I don't have a macos], it is incorrect for macos as well. |
hello @stilor, I am pretty sure I run : $ make distclean before running ./configure, but I'll double-check tomorrow. As far a concerns the second part, it deals with the gnu stat command in a peculiar way on osx : http://developers-club.com/posts/186124/ so we have to apply it so not to get a stat error just after the cross-build starts. Best, Arturo |
Re 2nd part of the patch: the command in your patch does not match the one in the link you posted. Note that in the link, they also changed The current form of the patch will break BSD systems (well, they are not exactly supported right now, but I hope to add such support). |
ok, i have figured it out. First of all I need to build binutils from source and copy the three tools :
to diff --git a/kconfig/Makefile b/kconfig/Makefile
index ee838aa3..1d1976a5 100644
--- a/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -10,6 +10,13 @@ CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\"" \
-DGPERF_LEN_TYPE="$(gperf_len_type)"
LDFLAGS = $(INTL_LIBS)
+# add additional cflags and ldflags for macports build
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Darwin)
+CFLAGS += -I/opt/local/include -std=gnu89
+LDFLAGS += -L/opt/local/lib -lintl
+endif
+
# Compiler flags to use gettext
ifeq ($(gettext),)
INTL_CFLAGS = -Wno-format-security -DKBUILD_NO_NLS
diff --git a/scripts/functions b/scripts/functions
index 9f852b39..cb0aafad 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -571,9 +571,12 @@ CT_DoForceRmdir() {
Linux|CYGWIN*)
mode="$(stat -c '%a' "$(dirname "${dir}")")"
;;
- Darwin|*BSD)
+ *BSD)
mode="$(stat -f '%Lp' "$(dirname "${dir}")")"
;;
+ Darwin)
+ mode="$(stat -f '%a' "$(dirname "${dir}")")"
+ ;;
*)
CT_Abort "Unhandled host OS $CT_SYS_OS"
;; then, after successfully built and installed the source, I have added this entry to the paths.mk file :
and this entry to the paths.sh file :
and then build nicely start and complete. My intention is to keep these changes locally from time to time when I need to build the toolchains...thank you again for your support ! |
The patch should say
No? Given a GNU stat. |
And the other tools can be pointed out at configure time. I have MacPorts and do:
|
Which is what I said, we should make a check for stat(1) in configure. |
stat selection should be solved by #594 |
Hello folks, I have bumped into an issue related here while building the latest trunk :
pfalcon/esp-open-sdk#236
I usually have also to apply this patch to make properly build the source and make it working after the build :
of course I have already installed and set in my PATH the GNU tools before the native ones :
gperf installed version is v3.0.4 and it should bring any issue while compiling....any help would be appreciated.
Best, Arturo
The text was updated successfully, but these errors were encountered: