# Excluding "-g" option when compiling

**URL:** <https://community.freefem.org/t/excluding-g-option-when-compiling/504>\
**Category:** FreeFEM installation\
**Created:** [July 12, 2020, 3:14pm UTC](https://community.freefem.org/t/excluding-g-option-when-compiling/504 "2020-07-12T15:14:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arousta](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@arousta](https://community.freefem.org/u/arousta)\
**Post date:** [July 12, 2020, 3:14pm UTC](https://community.freefem.org/t/excluding-g-option-when-compiling/504/1 "2020-07-12T15:14:35Z")

</div>

How can I make configure script to exclude the debug “-g” option? It includes -g even when we have --enable-optim to produce an optimized binary.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [July 12, 2020, 8:12pm UTC](https://community.freefem.org/t/excluding-g-option-when-compiling/504/2 "2020-07-12T20:12:58Z")

</div>

~~It’s there by default. You can remove the debug symbol using the [strip](https://sourceware.org/binutils/docs/binutils/strip.html) binary.~~

Sorry, I think you can just `./configure --disable-debug --enable-optim CFLAGS="" CXXFLAGS=""`, it should work.

---

<div class="post-metadata">

**Author:** ![arousta](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@arousta](https://community.freefem.org/u/arousta)\
**Post date:** [July 13, 2020, 9:36am UTC](https://community.freefem.org/t/excluding-g-option-when-compiling/504/3 "2020-07-13T09:36:26Z")

</div>

Thanks! this works and -g is gone
