Disable -Enable-Default-Pie for Gcc

I need to disable the -enable-default-pie option in the configuration of gcc, but I don't know how to do it. Is there a text file where I simply have to delete that option or how should this be done?

1 Answer

If you need a different configuration for the GCC, you need to recompile it.

Download GCC

Download or clone the GCC from the official website. As alternative, you can also install it from the Ubuntu source packages.

# Download gcc
$ wget 
$ tar xf gcc-7.3.0.tar.xz
$ cd gcc-7.3.0

# Clone gcc
$ git clone 
$ cd gcc; git checkout gcc-7_3_0-release

# Use Ubuntu sources
$ apt-get source gcc-7
$ cd gcc-7-7.3.0
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.