jcmvbkbc / crosstool-NG

crosstool-NG with support for Xtensa
Other
108 stars 183 forks source link

Does not compile in cygwin #6

Open riban-bw opened 9 years ago

riban-bw commented 9 years ago

Make fails on cygwin (32-bit - may be same with 64-bit) with errors about undefined reference to libintl... See this post for details of problem and fix: https://sourceware.org/ml/crossgcc/2012-05/msg00012.html.

riban-bw commented 9 years ago

Can be patched thus:

Save the following to a file called cygwin.patch :

--- ./kconfig/Makefile  2015-01-16 12:58:59.002108400 +0000
@@ -35,20 +35,21 @@
 conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC))
 conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ))
 $(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS)
+conf: LDFLAGS += -lintl

 # What's needed to build 'mconf'
 mconf_SRC = mconf.c
 mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC))
 mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC))
 $(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)
-mconf: LDFLAGS += $(NCURSES_LDFLAGS)
+mconf: LDFLAGS += -lintl $(NCURSES_LDFLAGS)

 # What's needed to build 'nconf'
 nconf_SRC = nconf.c nconf.gui.c
 nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC))
 nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC))
-$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses
-nconf: LDFLAGS += -lmenu -lpanel -lncurses
+$(nconf_OBJ) $(nconf_DEP): CFLAGS += -I/usr/include/ncurses/ $(INTL_CFLAGS)
+nconf: LDFLAGS += -lintl -lmenu -lpanel -lncurses

 # Under Cygwin, we need to auto-import some libs (which ones, exactly?)
 # for mconf and nconf to lin properly.
--- ./kconfig/nconf.c   2015-01-16 12:58:59.048908500 +0000
@@ -1518,7 +1518,7 @@
    }

    notimeout(stdscr, FALSE);
-   ESCDELAY = 1;
+   set_escdelay(1);

    /* set btns menu */
    curses_menu = new_menu(curses_menu_items);

Apply patch:

cd crosstool-NG
patch -p1 < cygwin.patch