John Brown
2017-05-24 10:10:03 UTC
Hello All,
I tried to follow the instructions at
http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file
to let me link to msvcr80 (to get access to _ftelli64). When I run
gcc -specs=msvcr80 -o hello hello.c, the result is:
$ gcc -specs=msvcr80 -o hello hello.c
gcc.exe: internal compiler error: in execute, at gcc.c:2699
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
hello.c looks like this:
// BEGIN hello.c
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello, world!\n");
return 0;
}
// END hello.c
It can be compiled without -specs=msvcr80.
/mingw/lib/gcc/mingw32/5.3.0/msvcr80 looks like this:
*msvcrt:
msvcr80
[SINGLE BLANK LINE]
*msvcrt_version:
-D__MSVCRT_VERSION__=0x0800
[SINGLE BLANK LINE]
*moldname:
moldname80
[SINGLE BLANK LINE]
At the top of /mingw/lib/gcc/mingw32/5.3.0/specs (created by
gcc -dumpspecs) I inserted the following lines:
*msvcrt:
msvcrt
[SINGLE BLANK LINE]
*msvcrt_version:
[1st BLANK LINE]
[2nd BLANK LINE]
*moldname:
moldname
[SINGLE BLANK LINE]
*asm:
[1st BLANK LINE]
[2nd BLANK LINE]
and changed the *cpp and *libgcc definitions as follows:
*cpp:
%(msvcrt_version) %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} %{pthread:-D_REENTRANT} %{!no-pthread: }
*libgcc:
%{mthreads:-lmingwthrd} -lmingw32 %{static|static-libgcc:-lgcc -lgcc_eh} %{!static: %{!static-libgcc: %{!shared: %{!shared-libgcc:-lgcc -lgcc_eh} %{shared-libgcc:-lgcc_s -lgcc} } %{shared:-lgcc_s -lgcc} } } -l%(moldname) -lmingwex -l%(msvcrt)
I am running the latest MinGW (gcc 5.3.0). Am I doing something wrong?
Regards,
John Brown.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe
I tried to follow the instructions at
http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file
to let me link to msvcr80 (to get access to _ftelli64). When I run
gcc -specs=msvcr80 -o hello hello.c, the result is:
$ gcc -specs=msvcr80 -o hello hello.c
gcc.exe: internal compiler error: in execute, at gcc.c:2699
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
hello.c looks like this:
// BEGIN hello.c
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello, world!\n");
return 0;
}
// END hello.c
It can be compiled without -specs=msvcr80.
/mingw/lib/gcc/mingw32/5.3.0/msvcr80 looks like this:
*msvcrt:
msvcr80
[SINGLE BLANK LINE]
*msvcrt_version:
-D__MSVCRT_VERSION__=0x0800
[SINGLE BLANK LINE]
*moldname:
moldname80
[SINGLE BLANK LINE]
At the top of /mingw/lib/gcc/mingw32/5.3.0/specs (created by
gcc -dumpspecs) I inserted the following lines:
*msvcrt:
msvcrt
[SINGLE BLANK LINE]
*msvcrt_version:
[1st BLANK LINE]
[2nd BLANK LINE]
*moldname:
moldname
[SINGLE BLANK LINE]
*asm:
[1st BLANK LINE]
[2nd BLANK LINE]
and changed the *cpp and *libgcc definitions as follows:
*cpp:
%(msvcrt_version) %{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} %{pthread:-D_REENTRANT} %{!no-pthread: }
*libgcc:
%{mthreads:-lmingwthrd} -lmingw32 %{static|static-libgcc:-lgcc -lgcc_eh} %{!static: %{!static-libgcc: %{!shared: %{!shared-libgcc:-lgcc -lgcc_eh} %{shared-libgcc:-lgcc_s -lgcc} } %{shared:-lgcc_s -lgcc} } } -l%(moldname) -lmingwex -l%(msvcrt)
I am running the latest MinGW (gcc 5.3.0). Am I doing something wrong?
Regards,
John Brown.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-***@lists.sourceforge.net
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-***@lists.sourceforge.net?subject=unsubscribe