Changing CFLAGS when using ./configure script

Posted on 2001-07-06
Last Modified: 2010-04-22

Ok, Im trying to compile SSH 3.0 on my FreeBSD on an Alpha server.

When I run the configure script everything is fine and my makefiles are created.

But the problem is when I compile with make.

It warn's me that the -O2 flag trigger some known optimiser bug.

So I would like to change the directive for it to use -O1 instead of -O2

I tried changing the CFLAGS shell variable, but it didn't work.
I also tried to change the CFLAGS directive in the top level MakeFile

but that didn't do eigther.

How can I tell make to use the -O1 flag instead of the -O2 flags when I run make?

Ps: If I try to compile using the -O2 flag, the systems panic and reboot.

Question by:Lazypete
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 14

Accepted Solution

chris_calabrese earned 50 total points
ID: 6259640
Look in the configure script for where it sets -O2.  You probably have to change it there.

Author Comment

ID: 6259926
Hmmm... is there somekind of... better way that tempering with the
configure script.... there is almost 20 places where
it set the CFLAGS variable in the script...

There must be another way...
LVL 14

Expert Comment

ID: 6259974
Well, the point of the configure script is that you're not supposed to have to know this stuff.  If there's a problem with your compiler, you need to change the configure script to detect the problematic compiler and change its behavior.  Then send the change back to the owner of the configure script.
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

LVL 14

Expert Comment

ID: 6259980
Or, if this is the commercial SSH you're using from F-Secure or SSH Communications, and they won't take the changes back, switch to OpenSSH where they will gladly take the changes back.

Expert Comment

ID: 6471961
Have you been helped here so that you may award and close this or is more needed?


Community Support Moderator @ Experts Exchange

Author Comment

ID: 6471971
well I finaly made it...
I tempered the file and I was able to compile it.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question