Gcc x86 linux 64 bit

HowTo Compile a 32-bit Application Using gcc On the 64-bit Linux Version

I had to compile a 32-bit application using GNU gcc on the 64-bit version of Linux.

Luckily, gcc man page directed me to the ‘-m32’ and ‘-m64’ options. These options generate code for 32-bit or 64-bit environments, respectively.

  1. The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system.
  2. The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD’s x86-64 architecture.

You can pass -m64 or -m32 options as follows to Gnu gcc

For 32 bit version:
$ gcc -m32 -o output32 hello.c
For 64 bit version :
$ gcc -m64 -o output64 hello.c
Run it as follows:
$ ./output32
Output:

Now let us see 64 bit output:
$ ./output64

Sample code – hello.c

A note about glibc-devel on 64 bit systems

You may see an error as follows on 64 bit system when you try to build 32 bit app:

This error message shows up on the 64 bit systems where GCC multilib feature is enabled, and it indicates that 32 bit version of libc is not installed. To fix this problem, on a CentOS/RHEL 5.x type the following yum command:
# yum -y install glibc-devel.i386 libstdc++-devel.i386
To fix this problem, on a CentOS/RHEL 6.x type the following yum command:
# yum -y install glibc-devel.i686 glibc-devel ibstdc++-devel.i686
To fix this problem on a Debian or Ubuntu Linux type the following apt-get command:
$ sudo apt-get install g++-multilib libc6-dev-i386
To fix this problem on a Suse (SLES) / OpenSUSE Linux type the following zypper command:
# zypper in glibc-devel-32bit

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

See also

# Additional correction by Braden B and others; Editing by VG – log #

Источник

Пакет: gcc-x86-64-linux-gnu (4:7.4.0-1ubuntu2.3 и другие) [ security] [ universe]

Ссылки для gcc-x86-64-linux-gnu

Ресурсы Ubuntu:

Сопровождающий:

Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.

Читайте также:  Клавиша блокировки кнопки windows

Original Maintainers (usually from Debian):

  • Debian GCC Maintainers (Почтовый архив)
  • Matthias Klose

It should generally not be necessary for users to contact the original maintainer.

Подобные пакеты:

GNU C compiler for the amd64 architecture

Другие пакеты, относящиеся к gcc-x86-64-linux-gnu

  • зависимости
  • рекомендации
  • предложения
  • enhances
  • dep: cpp-x86-64-linux-gnu (>= 4:7.3.0-3ubuntu2) [не i386] GNU C preprocessor (cpp) for the amd64 architecture dep: cpp-x86-64-linux-gnu (>= 4:7.4.0-1ubuntu2.3) [i386]
  • dep: gcc-7-x86-64-linux-gnu (>= 7.3.0-12

    ) [не i386] GNU C compiler (cross compiler for amd64 architecture) dep: gcc-7-x86-64-linux-gnu (>= 7.4.0-1

    ) [i386]

  • rec: libc6-dev-amd64-cross GNU C Library: Development Libraries and Header Files (for cross-compiling) или libc-dev-amd64-cross виртуальный пакет, предоставляемый libc6-dev-amd64-cross
  • sug: autoconf automatic configure script builder
  • sug: automake Tool for generating GNU Standards-compliant Makefiles
  • sug: bison YACC-compatible parser generator
  • sug: flex fast lexical analyzer generator
  • sug: gcc-doc Documentation for the GNU C compilers (gcc, gobjc, g++)
  • sug: gdb-x86-64-linux-gnu Пакет недоступен
  • sug: libtool Generic library support script
  • sug: make utility for directing compilation
    также виртуальный пакет, предоставляемый make-guile
  • sug: manpages-dev Manual pages about using GNU/Linux for development

Загрузка gcc-x86-64-linux-gnu

Загрузить для всех доступных архитектур

Архитектура Версия Размер пакета В установленном виде Файлы
arm64 4:7.3.0-3ubuntu2 1,4 Кб 26,0 Кб [список файлов]
i386 4:7.4.0-1ubuntu2.3 1,4 Кб 26,0 Кб [список файлов]
ppc64el 4:7.3.0-3ubuntu2 1,4 Кб 26,0 Кб [список файлов]

This page is also available in the following languages:

Авторские права © 2021 Canonical Ltd.; См. условия лицензии. Ubuntu это торговый знак компании Canonical Ltd. Об этом сайте.

Источник

GCC Releases

Download

GCC releases may be downloaded from our mirror sites.

Important: these are source releases, so will be of little use if you do not already have a C++ compiler installed. As one option, there are pre-compiled binaries. for various platforms.

You can also retrieve our sources using Git.

GCC Timeline

The table is sorted by date. Please refer to our development plan for future releases and an alternative view of the release history.

Release Release date
GCC 11.2 July 28, 2021
GCC 9.4 June 1, 2021
GCC 8.5 May 14, 2021
GCC 11.1 April 27, 2021
GCC 10.3 April 8, 2021
GCC 10.2 July 23, 2020
GCC 10.1 May 7, 2020
GCC 9.3 March 12, 2020
GCC 8.4 March 4, 2020
GCC 7.5 November 14, 2019
GCC 9.2 August 12, 2019
GCC 9.1 May 3, 2019
GCC 8.3 February 22, 2019
GCC 7.4 December 6, 2018
GCC 6.5 October 26, 2018
GCC 8.2 July 26, 2018
GCC 8.1 May 2, 2018
GCC 7.3 January 25, 2018
GCC 5.5 October 10, 2017
GCC 7.2 August 14, 2017
GCC 6.4 July 4, 2017
GCC 7.1 May 2, 2017
GCC 6.3 December 21, 2016
GCC 6.2 August 22, 2016
GCC 4.9.4 August 3, 2016
GCC 5.4 June 3, 2016
GCC 6.1 April 27, 2016
GCC 5.3 December 4, 2015
GCC 5.2 July 16, 2015
GCC 4.9.3 June 26, 2015
GCC 4.8.5 June 23, 2015
GCC 5.1 April 22, 2015
GCC 4.8.4 December 19, 2014
GCC 4.9.2 October 30, 2014
GCC 4.9.1 July 16, 2014
GCC 4.7.4 June 12, 2014
GCC 4.8.3 May 22, 2014
GCC 4.9.0 April 22, 2014
GCC 4.8.2 October 16, 2013
GCC 4.8.1 May 31, 2013
GCC 4.6.4 April 12, 2013
GCC 4.7.3 April 11, 2013
GCC 4.8.0 March 22, 2013
GCC 4.7.2 September 20, 2012
GCC 4.5.4 July 2, 2012
GCC 4.7.1 June 14, 2012
GCC 4.7.0 March 22, 2012
GCC 4.4.7 March 13, 2012
GCC 4.6.3 March 1, 2012
GCC 4.6.2 October 26, 2011
GCC 4.6.1 June 27, 2011
GCC 4.3.6 June 27, 2011
GCC 4.5.3 April 28, 2011
GCC 4.4.6 April 16, 2011
GCC 4.6.0 March 25, 2011
GCC 4.5.2 December 16, 2010
GCC 4.4.5 October 1, 2010
GCC 4.5.1 July 31, 2010
GCC 4.3.5 May 22, 2010
GCC 4.4.4 April 29, 2010
GCC 4.5.0 April 14, 2010
GCC 4.4.3 January 21, 2010
GCC 4.4.2 October 15, 2009
GCC 4.3.4 August 4, 2009
GCC 4.4.1 July 22, 2009
GCC 4.4.0 April 21, 2009
GCC 4.3.3 January 24, 2009
GCC 4.3.2 August 27, 2008
GCC 4.3.1 June 6, 2008
GCC 4.2.4 May 19, 2008
GCC 4.3.0 March 5, 2008
GCC 4.2.3 February 1, 2008
GCC 4.2.2 October 7, 2007
GCC 4.2.1 July 18, 2007
GCC 4.2.0 May 13, 2007
GCC 4.1.2 February 13, 2007
GCC 4.0.4 January 31, 2007
GCC 4.1.1 May 24, 2006
GCC 4.0.3 March 10, 2006
GCC 3.4.6 March 06, 2006
GCC 4.1.0 February 28, 2006
GCC 3.4.5 November 30, 2005
GCC 4.0.2 September 28, 2005
GCC 4.0.1 July 7, 2005
GCC 3.4.4 May 18, 2005
GCC 3.3.6 May 3, 2005
GCC 4.0.0 April 20, 2005
GCC 3.4.3 November 4, 2004
GCC 3.3.5 September 30, 2004
GCC 3.4.2 September 6, 2004
GCC 3.4.1 July 1, 2004
GCC 3.3.4 May 31, 2004
GCC 3.4.0 April 18, 2004
GCC 3.3.3 February 14, 2004
GCC 3.3.2 October 17, 2003
GCC 3.3.1 August 8, 2003
GCC 3.3 May 13, 2003
GCC 3.2.3 April 22, 2003
GCC 3.2.2 February 05, 2003
GCC 3.2.1 November 19, 2002
GCC 3.2 August 14, 2002
GCC 3.1.1 July 25, 2002
GCC 3.1 May 15, 2002
GCC 3.0.4 February 20, 2002
GCC 3.0.3 December 20, 2001
GCC 3.0.2 October 25, 2001
GCC 3.0.1 August 20, 2001
GCC 3.0 June 18, 2001
GCC 2.95.3 March 16, 2001
GCC 2.95.2 October 24, 1999
GCC 2.95.1 August 19, 1999
GCC 2.95 July 31, 1999
EGCS 1.1.2 March 15, 1999
EGCS 1.1.1 December 1, 1998
EGCS 1.1 September 3, 1998
EGCS 1.0.3 May 15, 1998
EGCS 1.0.2 March 16, 1998
gcc 2.8.1 March 2, 1998
gcc 2.8.0 January 7, 1998
EGCS 1.0.1 January 6, 1998
EGCS 1.0 December 3, 1997
2.7.2.3 August 22, 1997
2.7.2.2 January 29, 1997
2.7.2.1 June 29, 1996
2.7.2 November 26, 1995
2.7.1 November 12, 1995
2.7.0 June 16, 1995
2.6.3 November 30, 1994
2.6.2 November 12, 1994
2.6.1 November 1, 1994
2.6.0 July 14, 1994
2.5.8 January 24, 1994
2.5.7 December 12, 1993
2.5.6 December 3, 1993
2.5.5 November 27, 1993
2.5.4 November 16, 1993
2.5.3 November 11, 1993
2.5.2 November 1, 1993
2.5.1 October 31, 1993
2.5.0 October 22, 1993
2.4.5 June 20, 1993
2.4.4 June 19, 1993
2.4.3 June 1, 1993
2.4.2 May 31, 1993
2.4.1 May 26, 1993
2.4.0 May 17, 1993
2.3.3 December 26, 1992
2.3.2 November 27, 1992
2.3.1 November 1, 1992
2.3 October 31, 1992
2.2.2 June 14, 1992
2.2.1 June 9, 1992
2.2 June 8, 1992
2.1 March 24, 1992
2.0 February 22, 1992
1.42.0 (g++) September 20, 1992
1.42 September 20, 1992
1.41 August 27, 1992
1.41.0 (g++) July 13, 1992
1.40.3 (g++) October 19, 1991
1.40 June 1, 1991
1.39.1 (g++) May 4, 1991
1.39 January 16, 1991
1.38 December 21, 1990
1.37.1 (g++) March 1, 1990
1.37.0 (g++) February 28, 1990
1.37.1 February 21, 1990
1.37 February 11, 1990
1.36.4 (g++) January 30, 1990
1.36.3 (g++) January 16, 1990
1.36 September 24, 1989
1.35 April 26, 1989
1.34 February 23, 1989
1.33 February 1, 1989
1.32 December 21, 1988
1.31 November 19, 1988
1.30 October 13, 1988
1.29 October 6, 1988
1.28 September 14, 1988
1.27 September 5, 1988
1.26 August 18, 1988
1.25 August 3, 1988
1.24 July 2, 1988
1.23 June 26, 1988
1.22 May 22, 1988
1.21 May 1, 1988
1.20 April 19, 1988
1.19 March 29, 1988
1.18 February 4, 1988
1.17 January 9, 1988
1.16 December 19, 1987
1.15.3 (g++) December 18, 1987
1.15 November 28, 1987
1.14 November 6, 1987
1.13 October 12, 1987
1.12 October 3, 1987
1.11 September 5, 1987 (announced late)
1.10 August 22, 1987
1.9 August 18, 1987 (never announced)
1.8 August 10, 1987
1.7 July 21, 1987
1.6 July 2, 1987
1.5 June 18, 1987
1.4 June 13, 1987
1.3 June 10, 1987
1.2 June 1, 1987
1.1 May 24, 1987
1.0 May 23, 1987
0.9 (first beta release) March 22, 1987

Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

These pages are maintained by the GCC team. Last modified 2021-09-29 .

Источник

Читайте также:  Вирус для удаления windows
Оцените статью