Change or remove all gcc arguments on compiling cython code

346 views
Skip to first unread message

P Purkayastha

unread,
Sep 22, 2012, 6:29:07 AM9/22/12
to sage-s...@googlegroups.com
Hi,
  Is there any way to change or remove all the compilation flags provided to gcc while compiling cython code in Sage? Currently, I have a setup.py file and I am running
sage -python setup.py build_ext --inplace
to compile cython code.

I tried providing custom CFLAGS, like CFLAGS="-O0", but it seems to only get appended to the gcc command. I also tried exporting OPTS="" (found this advice for python in a stackoverflow thread) but that doesn't seem to help. Also tried the above in a "sage -sh" environment and then calling python directly.

Volker Braun

unread,
Sep 22, 2012, 6:58:36 AM9/22/12
to sage-s...@googlegroups.com
GCC specifies that the last option takes effect on the command line. Its common practice to append CFLAGS to override earlier ones. So gcc -O3 -O2 -O0 source.c compiles without optimization.

P Purkayastha

unread,
Sep 22, 2012, 9:13:18 AM9/22/12
to sage-s...@googlegroups.com
Yes, I am aware of that feature of gcc. What I really want to do is
remove the other flags. Currently, the gcc command looks like:

gcc -fno-strict-aliasing -march=native -pipe -fwrapv -DNDEBUG -g -fwrapv
-O3 -Wall -Wstrict-prototypes -fPIC
-I/home/punarbasu/Installations/sage-5.2.trac/local/include/python2.7 -c
code_functions.c -o build/temp.linux-x86_64-2.7/code_functions.o

I want this to be reduced to
gcc -O0 -I....(rest of the command)

The main reason for doing so is that I am trying to track a bug, but
want to check everything without optimization and other flags first.
> --
> You received this message because you are subscribed to the Google
> Groups "sage-support" group.
> To post to this group, send email to sage-s...@googlegroups.com.
> To unsubscribe from this group, send email to
> sage-support...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
>
>


Dan Aldrich

unread,
Sep 22, 2012, 12:16:56 PM9/22/12
to sage-s...@googlegroups.com
Is there a way to have folders in sagenb to contain your
worksheets? Would help organizing your worksheets.

-d


Jason Grout

unread,
Sep 22, 2012, 9:35:21 PM9/22/12
to sage-s...@googlegroups.com
On 9/22/12 11:16 AM, Dan Aldrich wrote:
> Is there a way to have folders in sagenb to contain your worksheets?
> Would help organizing your worksheets.

Not currently, though we would welcome help in implementing them. There
is at least one student that was working on it, but I don't know what
the status of the project is right now.

Right now you can use the search functionality to query for words. You
can put unique tags in the worksheets that you could then search for.
That helps with organization.

Thanks,

Jason

P.S. This email showed up as a reply to a completely unrelated email.
Please start a new topic or thread when asking a new question. That
helps us be more organized :).


Christophe BAL

unread,
Sep 23, 2012, 3:20:00 AM9/23/12
to sage-s...@googlegroups.com
Hello,
what is the way to implement folder ? Is it only a JS-HTML feature, or not ?

Christophe 
Reply all
Reply to author
Forward
0 new messages