1 1/2 weeks now for mingw toolchain waste..me-no-dev wrote:no luck with mingw here as well have you tried the toolchains I posted on the front post? they are compiled by espressif's instructions.
hey we are family
so be warned:
have a try with cygwin and crosstool-NG now,
but there are few bugs in the crosstool-NG!
why we work with unpatched crosstool-NG ?
i don't know
the patch is from 2012!
https://sourceware.org/ml/crossgcc/2012 ... 00012.html
Before you begin, it is imperative to set your file system to be case sensitive in Windows. Both the kernel headers and C library use file names with the same case insensitive name but different case sensitive name. Open regedit.exe and set the following to 0.
Code: Select all
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
to do's
..crosstool-NG/kconfig/nconf.c
Code: Select all
..
notimeout(stdscr, FALSE);
// bug
// ESCDELAY = 1;
// changed to
set_escdelay(1);
..
changed are marked with
# bug
# rudi 2016-jan-24
Code: Select all
#-----------------------------------------------------------
# Hmmm! Cheesy build!
# Or: where I can unveil my make-fu... :-]
all: conf mconf nconf
@true # Just be silent, you fscking son of a fscking beach...
# Build flags
CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\""
LDFLAGS =
# Compiler flags to use gettext
ifeq ($(gettext),)
INTL_CFLAGS = -DKBUILD_NO_NLS
endif
# Compiler and linker flags to use ncurses
NCURSES_CFLAGS = -DCURSES_LOC="\"$(curses_hdr)\""
NCURSES_LDFLAGS = $(LIBS)
# Common source files
COMMON_SRC = zconf.tab.c
COMMON_OBJ = $(patsubst %.c,%.o,$(COMMON_SRC))
COMMON_DEP = $(patsubst %.o,%.dep,$(COMMON_OBJ))
$(COMMON_OBJ) $(COMMON_DEP): CFLAGS += $(INTL_CFLAGS) -I.
# lxdialog source files
LX_SRC = $(sort $(wildcard lxdialog/*.c))
LX_OBJ = $(patsubst %.c,%.o,$(LX_SRC))
LX_DEP = $(patsubst %.o,%.dep,$(LX_OBJ))
$(LX_OBJ) $(LX_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)
# What's needed to build 'conf'
conf_SRC = conf.c
conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC))
conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ))
$(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS)
# bug
# rudi 2016-jan-24
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)
# bug
# rudi 2016-jan-24
# 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))
# bug
# rudi 2016-jan-24
# $(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.
ifeq ($(shell uname -o 2>/dev/null || echo unknown),Cygwin)
mconf: LDFLAGS += -Wl,--enable-auto-import
nconf: LDFLAGS += -Wl,--enable-auto-import
endif
# These are generated files:
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ))
ALL_DEPS = $(sort $(COMMON_DEP) $(LX_DEP) $(conf_DEP) $(mconf_DEP) $(nconf_DEP))
# Cheesy auto-dependencies
DEPS = $(COMMON_DEP)
DEPS += $(conf_DEP)
DEPS += $(mconf_DEP) $(LX_DEP)
DEPS += $(nconf_DEP)
-include $(DEPS)
# Build the dependency for C files
%.dep: %.c
@echo " DEP '$@'"
@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |$(sed) -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@
# Generate the grammar parser
zconf.tab.o: zconf.tab.c zconf.hash.c lex.zconf.c
zconf.tab.dep: zconf.tab.c zconf.hash.c lex.zconf.c
.PRECIOUS: zconf.tab.c
zconf.tab.c: zconf.y
@echo " BISON '$@'"
@bison -l -b zconf -p zconf $<
zconf.hash.c: zconf.gperf
@echo " GPERF '$@'"
@$(gperf) < $< > $@
lex.zconf.c: zconf.l
@echo " LEX '$@'"
@flex -L -Pzconf -o$@ $<
# Build C files
%.o: %.c
@echo " CC '$@'"
@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
# Actual link
mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ)
@echo " LD '$@'"
@$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)
nconf: $(COMMON_OBJ) $(nconf_OBJ)
@echo " LD '$@'"
@$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)
conf: $(COMMON_OBJ) $(conf_OBJ)
@echo " LD '$@'"
@$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)
#-----------------------------------------------------------
# Cleaning up the mess...
clean:
@echo " RM 'kconfig'"
@rm -f conf mconf nconf $(ALL_OBJS) $(ALL_DEPS)
@rm -f rm -f zconf.tab.c zconf.hash.c lex.zconf.c lex.backup
and if you build mingw toolchain under cygwin
be sure you:
Using crosstool-NG on Windows |
------------------------------+
Contributed by: Ray Donnelly
Prerequisites and instructions for using crosstool-NG for building a cross
toolchain on Windows (Cygwin) as build and, optionally Windows (hereafter)
MinGW-w64 as host.
0. Use Cygwin64 if you can. DLL base-address problems are lessened that
way and if you bought a 64-bit CPU, you may as well use it.
1. You must enable Case Sensitivity in the Windows Kernel (this is only really
necessary for Linux targets, but at present, crosstool-ng refuses to operate
on case insensitive filesystems). The registry key for this is:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
Read more at:
https://cygwin.com/cygwin-ug-net/using- ... names.html
2. Using setup{,-x86_64}.exe, install the default packages and also the
following ones: (tested versions in brackets, please test newer versions
and report successes via pull requests changing this list and failures to:
https://github.com/crosstool-ng/crosstool-ng/issues
autoconf (13-1), make (4.1-1), gcc-g++ (4.9.3-1), gperf (3.0.4-2),
bison (3.0.4-1), flex (2.5.39-1), texinfo (6.0-1), wget (1.16.3-1),
patch (2.7.4-1), libtool (2.4.6-2), automake (9-1), diffutils (3.3-3),
libncurses-devel (6.0-1.20151017), help2man (1.44.1-1)
mingw64-i686-gcc-g++* (4.9.2-2), mingw64-x86_64-gcc-g++* (4.9.2-2)
Leave "Select required packages (RECOMMENDED)" ticked.
Notes:
2.1 The packages marked with * are only needed if your host is MinGW-w64.
2.2 Unfortunately, wget pulls in an awful lot of dependencies, including
Python 2.7, Ruby, glib and Tcl.
3. Although nativestrict symlinks seem like the best idea, extracting glibc fails
when they are enabled, so just don't set anything here. If your host is MinGW-w64
then these 'Cygwin-special' symlinks won't work, but you can dereference them by
using tar options --dereference and --hard-dereference when making a final tarball.
I plan to investigate and fix or at least work around the extraction problem.
Read more at:
https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
4. collect2.exe will attempt to run ld which is a shell script that runs either
ld.exe or gold.exe so you need to make sure that a working shell is in your path.
Eventually I will replace this with a native program for MinGW-w64 host.
@chin.
http://blog.techlab-xe.net/archives/3274
i stopped the try to make the toolchain directly in MinGW
because, we need posix for do this, and only cygwin have this
so if we work at windows(64) then use cygwin64
now i hope we will have at end the comming week, all possible toolchains what is possible.
i start again, this time with cygwin64, under win7(64) and with --host=mingw32
hope we hang not again with ncurses.h and curses.h like in cygwin32.
we have installed 100x the header, devels and more, configure do not find the ncurses.h curses.h
in installed /usr/include/ncurses
hope we can go on now.
best wishes
rudi