What is the -E flag ??

Home Forums Forum What is the -E flag ??

This topic contains 17 replies, has 2 voices, and was last updated by  Marty 9 years, 9 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #4390

    Marty

    Hi All;
    Rich, I have tried to build for Arm, since at present I cannot run a make test command (see other post..)
    Anyway, the ./build arm gives the following —

    [root@localhost ellcc]# ./build arm
    cd llvm-build-arm-linux ; \
    ../llvm/configure \
    CC=/ellcc/bin/ecc CFLAGS=”-target arm-ellcc-linux-eabi5 -march=armv7 -mfpu=vfp -mfloat-abi=softfp -DELLCC_ARG0=\\\”arm-ellcc-linux-eabi5\\\”” \
    CPP=”/ellcc/bin/ecc -E” \
    CXX=/ellcc/bin/ecc++ CXXFLAGS=”-target arm-ellcc-linux-eabi5 -march=armv7 -mfpu=vfp -mfloat-abi=softfp -DELLCC_ARG0=\\\”arm-ellcc-linux-eabi5\\\”” \
    CXXCPP=”/ellcc/bin/ecc++ -E” \
    AR=/ellcc/bin/ecc-ar RANLIB=/ellcc/bin/ecc-ranlib \
    –bindir=/ellcc/bin-arm-linux –prefix=/ellcc \
    –host=arm-linux –build=x86_64-linux –enable-targets=arm \
    –enable-shared=no -enable-pic=no –enable-keep-symbols \
    –enable-optimized
    checking for arm-linux-clang… /ellcc/bin/ecc
    checking for C compiler default output file name… a.out
    checking whether the C compiler works… yes
    checking whether we are cross compiling… yes
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether /ellcc/bin/ecc accepts -g… yes
    checking for /ellcc/bin/ecc option to accept ISO C89… none needed
    checking whether we are using the GNU C++ compiler… yes
    checking whether /ellcc/bin/ecc++ accepts -g… yes
    checking how to run the C preprocessor… /ellcc/bin/ecc -E
    configure: error: C preprocessor “/ellcc/bin/ecc -E” fails sanity check
    See `config.log’ for more details.
    make: *** [llvm.configure] Error 1
    [root@localhost ellcc]#

    Should I Re-download Ellcc and Re-build from scratch ??
    the config.log file is very long, so I din’t copy it for you to look at, hopefully this is enough..
    I have also tried after the origional problem errors with stddef.h and etc., to do a Groupload from Yum for both Development Tools and C Development Tools and Libraries.. Which yielded about 20 files..

    THANK YOU Marty

    THANK YOU Marty

    #4393

    Marty

    Hi All;
    Rich, I also remember that Yesterday after building Ellcc on my friends Computer that after the first build, when I tried to do another ./build , it did the same thing gave me the Big -E error..
    So, on both machine it shows the same kind of error..
    His machine is also an Asus with i7 but faster than mine.. And my machine is His old Asus i7, before He upgraded to what he is using now..
    We are Both running Fedora 20, his is 3.4 and mine is 3.4.1..

    THANK YOU Marty

    #4396

    rich
    Keymaster

    Hi Marty,

    When you say “build for ARM” you mean you want to build ELLCC to run on ARM Linux, right? I’m not exactly sure what you’re trying to do.

    If you are just trying to cross-compile for ARM, then
    ecc -target arm-ellcc-linux-eabi -o echo echo.c
    should work.

    -Rich

    #4397

    Marty

    Hi All;
    Rich; I did a Total Rebuild, which has just finished..
    I am gpoing to try and do a Make check.. And see IF it fairs any better..

    Expected Passes : 21
    Expected Failures : 11
    Unexpected Failures: 31
    make: *** [check] Error 1

    a starting example of the problem, it looks like its the same problem as when trying to run a problem without the -target option..

    Please run the build script again to bootstrap ecc.

    (((( Does this mean I should be able to re-run ./build again !!!! It will not let me do a rebuild, gives the Big -E error !!!!!! ))))
    This may be done a few times:
    1. ecc is built with itself (compiled with gcc) and libecc.
    2. ecc is built with itself (compiled with itself) and libecc.

    (((( And is this stating what it already has done, or what it still need to do ???? ))))
    [root@localhost ellcc]# cd test
    [root@localhost test]# make check
    ( ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -s 8192 ; \
    ../bin/ecc-lit -s -v . )
    ecc-lit: lit.cfg:120: note: using ecc: ‘/ellcc/bin/ecc’
    ecc-lit: lit.cfg:120: note: using ecc: ‘/ellcc/bin/ecc’
    FAIL: ELLCC :: src/bzip2-1.0.6/bzip2.tc (3 of 63)
    ******************** TEST ‘ELLCC :: src/bzip2-1.0.6/bzip2.tc’ FAILED ********************
    Script:

    make

    Exit Code: 2

    Command Output (stdout):

    make clean
    make[1]: Entering directory `/ellcc/test/src/bzip2-1.0.6′
    rm -f *.o libbz2.a bzip2recover \
    sample1.rb2 sample2.rb2 sample3.rb2 \
    sample1.tst sample2.tst sample3.tst
    make[1]: Leaving directory `/ellcc/test/src/bzip2-1.0.6′
    make bzip2all
    make[1]: Entering directory `/ellcc/test/src/bzip2-1.0.6′

    If compilation produces errors, or a large number of warnings,
    please read README.COMPILATION.PROBLEMS — you might be able to
    adjust the flags in this Makefile to improve matters.

    Also in README.COMPILATION.PROBLEMS are some hints that may help
    if your build produces an executable which is unable to correctly
    handle so-called ‘large files’ — files of size 2GB or more.

    ../../../bin/ecc -Wall -Winline -g -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE -c blocksort.c
    make[1]: Leaving directory `/ellcc/test/src/bzip2-1.0.6′


    Command Output (stderr):

    In file included from blocksort.c:22:
    In file included from ./bzlib_private.h:25:
    /usr/include/stdlib.h:139:8: error: unknown type name ‘size_t’
    extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
    ^
    /usr/include/stdlib.h:466:22: error: unknown type name ‘size_t’
    extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
    ^
    /usr/include/stdlib.h:468:22: error: unknown type name ‘size_t’
    extern void *calloc (size_t __nmemb, size_t __size)
    ^
    /usr/include/stdlib.h:468:38: error: unknown type name ‘size_t’
    extern void *calloc (size_t __nmemb, size_t __size)
    ^
    /usr/include/stdlib.h:480:36: error: unknown type name ‘size_t’
    extern void *realloc (void *__ptr, size_t __size)
    ^
    /usr/include/stdlib.h:756:9: error: unknown type name ‘size_t’
    size_t __nmemb, size_t __size, __compar_fn_t __compar)
    ^
    /usr/include/stdlib.h:756:25: error: unknown type name ‘size_t’
    size_t __nmemb, size_t __size, __compar_fn_t __compar)
    ^
    /usr/include/stdlib.h:765:34: error: unknown type name ‘size_t’
    extern void qsort (void *__base, size_t __nmemb, size_t __size,
    ^
    /usr/include/stdlib.h:765:50: error: unknown type name ‘size_t’
    extern void qsort (void *__base, size_t __nmemb, size_t __size,
    ^
    /usr/include/stdlib.h:863:36: error: unknown type name ‘size_t’
    extern int mblen (const char *__s, size_t __n) __THROW;
    ^
    /usr/include/stdlib.h:866:20: error: unknown type name ‘wchar_t’
    extern int mbtowc (wchar_t *__restrict __pwc,
    ^

    Thank You Marty

    #4399

    rich
    Keymaster

    Hi Marty,

    Back up a bit. How did you end up fixing the missing stddef,h file problem? It looks as if you are still running into header file issues.

    -Rich

    #4400

    Marty

    Hi all;
    Rich I didn’t see Your answer till after I posted the last entry, like now..
    Not, exactly, I want to with the help of Ellcc to use my x86_64 to build a cross-compiler for am Arm type of processor..
    What the goal is — is to be able with Ellcc and llvm and clang, to build a cross-compiler that runs on a X86_64 Linux Box that will spit out Arm code that If loaded into the Arm, it would run correctly in the Arm processor/memory..
    I am the front man, doing the research, and my friend wants to first be able to put out proper ARM code, and then later with llvm and Clang change the Backend and re-run it to put out our code, or the Arm code with our changes..

    THANK YOU Marty

    #4402

    Marty

    Hi All;
    Rich, Thank You for your answers..

    How did you end up fixing the missing stddef,h file problem?

    According to the Fedora site the file is in the include/gcc/xxxxx and I copied it from there to the usr/include/ place.. Basically I did the same for the sdtarg.h file as well.. But it sure didn’t like the lidio.h file without your -Target fix..

    THANK YOU Marty

    #4403

    rich
    Keymaster

    Hi Marty,

    OK. That makes sense. If you build ecc for an x86_64, it is already a cross compiler. For example:

    [~] dev% ~/ellcc/bin/ecc -target x86_64-ellcc-linux hello.c -o hello
    [~] dev% file hello
    hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=ca1d061508ddf0c5796f43abde11936f368d61b2, not stripped
    [~] dev% ~/ellcc/bin/ecc -target arm-ellcc-linux hello.c -o hello
    [~] dev% file hello
    hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, BuildID[sha1]=5f01f7679ad701b8b128b94b0a97a8131617aba7, not stripped
    [~] dev% 
    

    Notice that the first hello is for the x86_64 and will run on the host. The second hello will only run on an ARM based system.

    In other words, unlike gcc, ecc (and clang/LLVM) support multiple target processors with one host executable. Very convenient.

    When you try to do
    ./build arm
    what you are doing is building the whole ELLCC package (ecc, and everything else) to run on an ARM target.

    -Rich

    #4405

    Marty

    Hi All;
    Thank You Rich, for the explaination.. I thought it was to build for an arm..

    When you try to do
    ./build arm
    what you are doing is building the whole ELLCC package (ecc, and everything else) to run on an ARM target.

    That clears up things alot..

    Ok, with that cleared up..
    WHY, am I getting these other check etc, errors ???
    Am I doing something Wrong in or with my initial build ??
    As well as to why it needs the -target option, when You say You don’t need it… And You have Fedora 20 and an 86_64 machine as I do..
    What Fedora Programs do I need to have pre-loaded to properly run Ellcc ??
    When I do a clean build, is there a step I am not doing or skipping over ??
    I MUST be doing something different than You are doing to get different results..
    THANK YOU Marty

    #4406

    rich
    Keymaster

    Marty,

    What’s a good question. I’m not sure why you are having the header file problems. Very strange. You should not have to copy any .h files anywhere if you have the right packages installed. The question is “What are the right packages?”. 🙁

    You don’t have to deal with building ELLCC at all if you don’t want to. I have pre-built binaries available for several Linux hosts at ftp://ellcc.org/pub

    Make sure to download the x86_64 host version. 😉

    -Rich

    #4408

    Marty

    Hi All;
    Rich, Thank You for the offer.. I guess one of the reasons I am wanting to build it all from scratch, is to understand the whole process..
    That way when I show my friend what to do I can not only tell Him what to do, but hopefully Answer His Questions..
    Since my last posting, I have done the following..
    I had before trying to rebuild, I had restarted my System, so that it would Load from Kernel 3.11, Instead of what I had used before which was 3.14..
    Now, just since my last posting I used Yum to down grade my kernel-header file, I found it had the old header file for 3.14, it is now 3.11, as well as the Kernel-devel file which was 3.14 instead of 3.11..
    Anything else that YOU think I should check what Version I have and IF needed to, then downgrade it..
    And I will reload the Ellcc and rebuild it again.. And see IF that makes any difference or helps !!!!!!!!!!!!!!!

    THANK YOU Marty

    #4409

    Marty

    Hi All;
    Rich, I just downloaded the file , Just in case like You suggested..
    Also, the One for the PPC, for another project of my own.. I have an old Apple PPC unit, that has Linux Fedora 14 on it..
    THANK YOU Marty

    #4411

    Marty

    Hi All;
    Rich, I have re-downloaded Ellcc and I am building it with the build line thus —
    ./build x86_64

    We’ll see if it builds and If it passes Make check and then if it can compile without the -Target option..

    THANK YOU Marty

    #4412

    Marty

    Hi All;
    Rich, it failed to completely build that way.. Here is the listing of the Last part of it, hopefully You can tell where it is in the process..

    rm -f tools/musl-gcc
    rm -f include/bits/alltypes.h src/internal/version.h
    rm -f include/bits
    make[1]: Leaving directory `/ellcc/libecc/src/musl’
    checking for C compiler… /ellcc/libecc/../bin/ecc
    checking whether compiler is gcc… no
    checking target system type… arm
    checking whether compiler accepts -std=c99… no
    checking whether compiler accepts -nostdinc… no
    checking whether compiler accepts -ffreestanding… no
    checking whether compiler accepts -fno-builtin… no
    checking whether compiler accepts -fexcess-precision=standard… no
    checking whether compiler accepts -frounding-math… no
    checking whether compiler needs attribute((may_alias)) suppression… yes
    checking whether compiler accepts -fno-tree-loop-distribute-patterns… no
    checking for optimization settings… disabled
    checking whether compiler accepts -pipe… no
    checking whether compiler accepts -fno-unwind-tables… no
    checking whether compiler accepts -fno-asynchronous-unwind-tables… no
    checking whether compiler accepts -Wa,–noexecstack… no
    checking whether compiler accepts -Werror=implicit-function-declaration… no
    checking whether compiler accepts -Werror=implicit-int… no
    checking whether compiler accepts -Werror=pointer-sign… no
    checking whether compiler accepts -Werror=pointer-arith… no
    checking whether compiler accepts -Wall… no
    checking whether compiler accepts -Wno-parentheses… no
    checking whether compiler accepts -Wno-uninitialized… no
    checking whether compiler accepts -Wno-missing-braces… no
    checking whether compiler accepts -Wno-unused-value… no
    checking whether compiler accepts -Wno-unused-but-set-variable… no
    checking whether compiler accepts -Wno-unknown-pragmas… no
    checking whether compiler accepts -Wno-pointer-to-int-cast… no
    checking whether compiler accepts -fno-stack-protector… no
    checking whether linker accepts -Wl,–hash-style=both… no
    checking whether linker accepts -Wl,-Bsymbolic-functions… no
    warning: disabling dynamic linking support
    using compiler runtime libraries: -lcompiler-rt
    checking preprocessor condition __ARMEB__… true
    checking preprocessor condition __ARM_PCS_VFP… true
    configured for arm variant: armebhf
    checking whether compiler’s long double definition matches float.h… ./configure: line 471: /ellcc/libecc/../bin/ecc: No such file or directory
    no
    ./configure: error: unsupported long double type
    make: *** [arm] Error 1
    [root@localhost ellcc]#

    THANK YOU Marty

    P.S. I will Re-load and try a plain build..

    #4414

    Marty

    Hi All;
    Rich, I get the same as I did in posting #4396..
    I am going to try and load Your prebuild Binaries..
    THANK YOU Marty

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.