binutils-2.3.4 and gdb-9.1

Windows specific questions.
srvaldez
Posts: 2430
Joined: Sep 25, 2005 21:54

binutils-2.3.4 and gdb-9.1

Postby srvaldez » Sep 12, 2019 15:21

in case anyone wants the latest binutils-2.3.4
updated to version 2.3.4
how I built binutils using msys2
./configure --disable-shared --enable-static
make CFLAGS="-static -std=gnu99 -static-libgcc -static-libstdc++ -O2"
Last edited by srvaldez on May 06, 2020 21:31, edited 2 times in total.
srvaldez
Posts: 2430
Joined: Sep 25, 2005 21:54

binutils-2.3.4 and gdb-9.1

Postby srvaldez » May 06, 2020 18:23

updated to version 2.3.4
here's gdb-9.1
UEZ
Posts: 563
Joined: May 05, 2017 19:59
Location: Germany

Re: binutils-2.3.4 and gdb-9.1

Postby UEZ » May 07, 2020 16:59

@srvaldez: thanks for the packages but what can I do with it? I'm novice in this area...^^
srvaldez
Posts: 2430
Joined: Sep 25, 2005 21:54

Re: binutils-2.3.4 and gdb-9.1

Postby srvaldez » May 07, 2020 18:11

hello UEZ
there's nothing groundbreaking about them and you probably won't notice any difference by replacing the tools that are included in the FB distribution, except perhaps gdb because the version that comes with FB is old.
it's just that some months ago when I was building FB I was having problems due to old binutils, that's why I got interested in the latest version of them.
besides of what is included in FB the rest of the tools are there, for example there's objdump, this tool can be used to disassemble executables
for online help just do: objdump --help
to disassemble an exe you would do something like this: objdump.exe -d -M intel,x86-64 your_prog.exe
you should probably direct the output to a text file like: objdump.exe -d -M intel,x86-64 your_prog.exe >prog_listing.txt
UEZ
Posts: 563
Joined: May 05, 2017 19:59
Location: Germany

Re: binutils-2.3.4 and gdb-9.1

Postby UEZ » May 08, 2020 6:18

srvaldez wrote:hello UEZ
there's nothing groundbreaking about them and you probably won't notice any difference by replacing the tools that are included in the FB distribution, except perhaps gdb because the version that comes with FB is old.
it's just that some months ago when I was building FB I was having problems due to old binutils, that's why I got interested in the latest version of them.
besides of what is included in FB the rest of the tools are there, for example there's objdump, this tool can be used to disassemble executables
for online help just do: objdump --help
to disassemble an exe you would do something like this: objdump.exe -d -M intel,x86-64 your_prog.exe
you should probably direct the output to a text file like: objdump.exe -d -M intel,x86-64 your_prog.exe >prog_listing.txt


Thanks for your reply.
I thought objdump.exe can disassemble .o files only but nice to know that it works also with exe files.
dodicat
Posts: 6503
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: binutils-2.3.4 and gdb-9.1

Postby dodicat » May 08, 2020 22:44

Hi UEZ.
I get the minGW package from the forum news thread for FB version 1.07.1 (the newest)
AT the lines
The MinGW-w64 toolchains used for the main win32/win64 builds can be found here:
underneath are the 32 and 64 bit mingw distributions, you can choose from gcc 5.2 to 8.1 as you read down the page.

Expanded (by 7zip), they are about 500 mb.


I have a folder on C: drive called mingw, and I put all the the sub folders of the expanded distribution into it this like:

bin
etc
include
libexec
. . .
. . .

I have c:/mingw/bin on the system path

For 64 bits and 32 bits I have them each in a folder of their own, mingw32 and mingw64. If I want 64 bit mingw I rename the appropriate folder mingw
At the moment I have the first one, the 5.2 release 32 and 64 bits, and I have the 64 bit version in the mingw folder.
You then have all these exe files ready at any command prompt, objdump, gendef, nm, dlltool, make, strip . . .
UEZ
Posts: 563
Joined: May 05, 2017 19:59
Location: Germany

Re: binutils-2.3.4 and gdb-9.1

Postby UEZ » May 09, 2020 12:45

@dodicat: thanks for your reply.

As an example:

These are the packages to use FB to code something.
Windows Binaries (mingw-w64 gcc 8.1.0)
FreeBASIC-1.07.1-win32-gcc-8.1.0.zip archive | .7z archive - 32bit version
FreeBASIC-1.07.1-win64-gcc-8.1.0.zip | .7z archive - 64bit version
gcc-8.1.0-for-FB-win32-gengcc.zip - 32bit gcc for the FB-win32 package, in case you want to use -gen gcc.



But for what are these packages? To build FB itself?
fbc-1.07.1-win32-8.1.0.zip | .7z archive - to be extracted into existing 32bit MinGW-w64 toolchain
fbc-1.07.1-win64-8.1.0.zip | .7z archive - to be extracted into existing 64bit MinGW-w64 toolchain
The MinGW-w64 toolchains used for the main win32/win64 builds can be found here:
i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
dodicat
Posts: 6503
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: binutils-2.3.4 and gdb-9.1

Postby dodicat » May 09, 2020 14:25

If you have mingw on your computer and mingw/bin (32 bits say) is on the system path, then
fbc-1.07.1-win32-8.1.0.zip
when extracted can use your
i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z distro.
(which is your chosen mingw above)
The gcc from your mingw is used, and you see that this fb download is much smaller.

Not building FreeBASIC, just using it.

Remember that mingw will give you working gcc and g++ compilers.
(Also a fortran compiler)
You can also get hold of ADA (gnat.exe), there is also a pascal compiler (gnupascal)
But I see only gcc, g++ and gfortran in the mingw distros given to us by coder Jeff.

I think that many C, C++ coders will have mingw.
So the philosophy is I suppose, If you have a working gcc compiler on board (mingw), then why not use it for your FreeBASIC.

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 2 guests