Programming :: Default CFLAGS In Gcc When None Are Specified?

Oct 21, 2010

I have kind of a weird question. All Slackbuilds use -march=i486 -mtune=i686 -O2 to pass to gcc for standard building. What does gcc use by default if none are specified. Say for instance I just did ./configure && make && make install without specifying -march.

View 7 Replies


ADVERTISEMENT

Ubuntu :: Apt-get -b Source: How To Add CFLAGS/CXXFLAGS

Apr 1, 2010

I was wondering if there were a way to use the apt-get -b source command and add CFLAGS and CXXFLAGS in order to build things with optimized code. Also, would it be possible to use Intel's ICC for compiling with apt-get -b source

View 1 Replies View Related

Slackware :: Set CFLAGS And Other Make Options?

Jan 2, 2010

I've been googling and reading up on how to set build optimizations for my system, and after consulting the Arch Wiki, old threads here, and some mailing lists, I've concluded that the way to set CFLAGS, etc. is by putting this in /etc/profile:

Code:
export CHOST="x86_64-unknown-linux-gnu"
export CFLAGS="-march=native -O2 -pipe"

[code]....

View 6 Replies View Related

Software :: Bash Script Calling Make Files With CFLAGS Prepended?

Feb 6, 2010

Most all of this works when I execute it manually, but I cannot figure out how to get a bash script to execute it automatically.In this particular case, I am trying to build the xorg utilities. If I manually step through the process, prepending the commands with CFLAGS, LDFLAGS, etc, all of the packages build.So I created a bash script, test.sh:

Code:
#!/bin/bash
export INITFS=/initfs

[code]...

View 5 Replies View Related

Slackware :: Worth Changing Chost If System Built With Custom Prescott Cflags?

Oct 18, 2010

I built my slackware system from source code. Bootstrapped, toolchained etc.. The only thing I didn't change was the chost thinking that life would be easier if left alone @ i486. Would I have gained anything if I had used i786 or even pentium4 (pentium4-slackware-linux-gnu)?

I already got all the benefits of optimization when I used (still using) my own CFLAGS CXXFLAGS right? So changing the chost won't do anything speed wise will it? If I used march=prescott when compiling everything am I ok to just forget about the chost value? It's not gonna change anything will it?

View 7 Replies View Related

Programming :: Can't Get Script To Use A Default Value / Want That?

Jun 24, 2009

I was just trying to get a simple script to use a default value
if the user hit enter without typing in a value and i got an error. code...

View 5 Replies View Related

Debian Programming :: Virtualenv - How To Default To Python3

May 16, 2015

I have a few questions regarding virtualenv and virtualenvwrappers. The following packages are available, I am currently using python3 for my project. However I would like have the option to use either 2.7 or 3.x for my virtual environments.

Given this do I install both python-virtualenv and python3-virtualenv? What is that third package all about, does virtualenv support both versions by chance? I chose to install both python-virtualenv, and python3-virtualenv (not sure if both were actually needed). These packages where installed via apt-get.

python-virtualenv - Python virtual environment creator
python3-virtualenv - Python virtual environment creator
virtualenv - Python virtual environment creator
virtualenvwrapper - extension to virtualenv for managing multiple virtual Python environments

So far so good, "virtualenv test" creates a python2 env, and "virtualenv --python=/usr/bin/python3 test2" creates a python3 environment.

After installing virutalenvwrapper (also installed with apt-get) is where I hit the problem. In an attempt to default ot python3 I added the following to my .bashrc file.

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh

Sourcing the .bashrc file cases the following error. What am I missing here?

/usr/bin/python3: Error while finding spec for 'virtualenvwrapper.hook_loader' (<class 'ImportError'>: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 and that PATH is set properly.

Further searching found a post on stackoverflow which led me to change the .bashrc to the three lines below. After this change it all works!!!

export VIRTUALENV_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects

Finally the commands for the two versions of environments.

Python3 (default) "mkvirtualenv test"
Python2 "mkvirtualenv --python=/usr/bin/python2 test2"

View 0 Replies View Related

Programming :: Default Library - Static Or Shared?

Aug 27, 2009

My code needs to link to some libraries. In my project file, I specify linker to link to abc library, for example. By default, does gcc link to libabc.a or libabc.so ? What if I really need to specify static or shared, how do I do that?

View 4 Replies View Related

Programming :: Default Port For UDPWriter Class?

May 9, 2011

This is a really specific question, but maybe someone can help. I'm debugging someone else's code, and they call a UDPWriter and specify an IP address and port, and I'm trying to make sure this multicast traffic goes over a certain port. How can I determine which port the UDP defaults to and change it?

It's confusing to me because I'm not familiar with all the layers the OS sends traffic through before it goes through the interface. Is there maybe some simpler way to tell the OS to send multicast traffic over both interfaces?

View 2 Replies View Related

Programming :: Create Perl Script That Take The Default Value

May 10, 2011

I would like to create perl script that take the default value instead of waiting for me to enter the enter. I have running script that make key for vpn and when I run the script it will start creating key and then ask me questions like what is your country[:us] what is your state name[:nj] ......

so every time I just have to enter cause I need to enter only default values. So is there any way that I can create script that just take me directly to the end without waiting for me to enter anything and taking by default values.

View 3 Replies View Related

Programming :: Finding Mac Address For Default Route?

May 11, 2009

I would like, from a C program, find the hardware MAC address of the default route path. With BASH I can do a 'route' find 'default and then an ifconfig and grep for 'HWaddr'. Are there C calls to do the same??

View 12 Replies View Related

Programming :: Specify Different Port Other Than Default 22 For One Particular Server In Hostlist

Apr 8, 2011

I have the first part of this script working, but I need help on how to specify a different port other than the default 22 for one particular server in my hostlist. First, here's my working script:

[code]....

Now, the hostlist contains a few servers that all share the same password in this test so as not to complicate that portion of expect's password section. However, one of the servers within hostlist_test will need to have the ssh port defined as, for example, 5522 as I've defined the port forward in DD-WRT's NAT section and changed in the appropriate /etc/ssh/sshd_config for listening. Might anyone be able to help me include that part in my script?

View 4 Replies View Related

Programming :: Editing Script To Create A Default Web Page?

Nov 14, 2010

The title of this post may sound like it's real easy and simple enough for a noob to do but my situation isn't noobish.I have this script that i found on the internet that i wish to edit and create a new user and set a pass word AND create a default web page in the /var/www/html directory. This is the script with my edits included. The commented out field are my own editing.....

Code: #!/bin/bash
# Script to add a user to Linux system
if [ $(id -u) -eq 0 ]; then

[code]...

View 1 Replies View Related

Programming :: Bash Script 'read' With Default Values

Mar 5, 2010

I have a fallowing simple bash script:

Code:
#!/bin/bash
echo -n "Please insert your name: "
read NAME

[Code]....

It works fine, but is it possible to have default values using bash read(1b)? I mean if user is prompter for sex, he just pushes ENTER and by default 'm' is chosen. Or if user is prompted for hometown and he doesn't insert anything, but just pushes ENTER button, 'New-York' sis chosen by default Are such default values possible in bash?

View 1 Replies View Related

Programming :: Delete The Default Gateway Via NETLINK Kernel API?

Apr 15, 2010

I am looking for a way to delete the systems default gateway from the routing table via the NETLINK API.Unfortunately, the documentation I found about NETLINK is incomplete.There are some basics (communicating with the kernel, reading the routing table) but not much more.Does anyone know the packet format for deleting a routing table entry, especially deleting the default gateway? I can set or change the default gateway with the following parameters (there are more, but I left out all the non-essential ones):

NL-Msg Header:
nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE;
nlmsg_type = RTM_NEWROUTE;

[code]....

View 1 Replies View Related

Programming :: Get Default Browser Name And Mail Client Name By Programmatically?

May 4, 2009

I am developing a application in which i have to show the name of default browser and mail client. i want to run this application on RedHat, SuSE, Mandriva, and Ubuntu. I have checked similar threads but not found any useful information.

View 8 Replies View Related

Programming :: JFileChooser : Setting The Default 'file Filter'

Sep 28, 2010

Code:

// create a filechooser;
JFileChooser chooser = new JFileChooser(cwd);
FileNameExtensionFilter filter = new FileNameExtensionFilter(
"sdf files (*.sdf)", "sdf");

[code]....

This will give 3 filefilters ('all files', 'sdf files' and 'xml files') for a fileopen dialog. Exactly as I want (in alphanumerical order), but XML is the default extension and I like SDF to be the default extension. Research has not revealed solutions; the setFileFilter method sets the primary filter. If I swap the sequence in the code, SDF becomes the default (as I want) but the sequence is wrong (All, XML, SDF).

View 3 Replies View Related

Programming :: Replace The Default Path In A File(which Is A Script)?

Jul 19, 2010

I am trying to replace the default path in a file(which is a script)with the new path which I have get when the bash script runsThe code is

SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPT`
sed -i "s/$HomeDir/$SCRIPTPATH/g" <filename>

[code]....

View 4 Replies View Related

Programming :: Using Shell To Create A Default Web Page For New Users?

Nov 14, 2010

I came across this script a while back that i found. What i want to do is edit the script to create a default web page in /var/www/html a new user is added through the script.What the script does now is adds a user and sets a password for the user. What possible way (either through a combination of python or c or some other language) could i add to the shell script to do this? I've tried just dointhe command to touch index.html /var/www/html but it puts it on the desktop. Here's the script....

Code:
#!/bin/bash
# Script to add a user to Linux system

[code]...

View 3 Replies View Related

Programming :: Changing Shared Object File Default Place

Mar 27, 2010

I wanted to know how can I change the default place of shared object files of a program in a system. let me explain it better for you : I have an embedded computer with Linux OS that its file system is read only and I can not add any file to /usr /lib and ..... and I can just mount a SD memory card to it and copy all of my programs to it and run them from there as you understand I have two choices to choose, first make one big binary file for each program that I am doing it now and it is not a suitable solution and the second is finding the way to change default place of shared object file of my program.

View 1 Replies View Related

Programming :: Make A Template Char Or Wchar_t Default Function Argument?

Oct 30, 2009

I have a template similar to the following.

Code:

template <charT>
virtual void do_get_date(charT* = "str")
{ ... }

As you can see we have a problem. If we use a wchar_t instead the string wont be formatted right we need to prefix L in front. If we use char16_t we need to prefix a u in front. Is there a was to make the generic without resorting the the std::string class?

View 2 Replies View Related

Programming :: Sets Sigpipe's Default Action To Ignore And Opens A Socket?

Jul 27, 2011

I'm studying an OS programming book, in particular network sockets. I have two questions(2nd one is down at the bottom). There is something I don't quite understand. What if this piece of code, which sets sigpipe's default action to ignore and opens a socket:

Code:
if ((u_ignore_sigpipe() != 0) || ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1))
return -1;

[code]....

View 3 Replies View Related

Programming :: Cmake: Using Find_package(Boost) When FindBoost.cmake Is Not In The Default Location?

Feb 23, 2010

I am attempting to compile some code on a cluster where I do not have root access (and is missing many of the libraries I want), and hence have had to create local builds of the boost and opencv libraries (i.e. in /home/username/usr/local). In particular, my cmake depends on:

Code:

find_package(boost)

which my normal development machine finds in:

Code:

/usr/share/cmake-2.6/Modules/FindBoost.cmake

On the cluster I have a version of FindBoost.cmake at:

Code:

/home/username/cmake_modules

How can I tell CMake to look for FindBoost.cmake in that directory, since neither the cmake file, nor the boost install is in the standard location? I've modified the FindBoost.cmake file to make it search in the locally installed boost libraries.

[code]....

View 3 Replies View Related

Programming :: C - For System Calls, Is Blocking Or Non-blocking Default?

Mar 23, 2010

For system calls, is blocking or non-blocking default in C? Simple question, just am not seeing the answer super quickly.

View 4 Replies View Related

Ubuntu :: Lost Default User Log On / Accidently Deleated Lucid Default Theme

May 18, 2010

accidently deleated ubuntu lucid default theme,and lost the default user logon,it's now flat and gray.how to get it back?i still have the background, not the user logon

View 8 Replies View Related

Ubuntu :: How To Make Default Package Installer From Lucid Be Default In Maverick?

Oct 24, 2010

in maverick the default package installer (when I double click on a .deb) is Ubuntu Software Centre, how can I make the default package installer from lucid (was it called "dpkg"?) the default again? Ubuntu Software Centre is too slow and freezes every time I click on something, can it be replaced?

View 2 Replies View Related

Red Hat :: Change The Default Text That Is Displayed On The Default BASH Logon (attached)?

Sep 12, 2010

How is it possible to change the default text that is displayed on the default BASH logon (attached)?

View 1 Replies View Related

Ubuntu Installation :: Adjust The Default Setting Via /etc/default/grub?

May 29, 2010

I have already had Vista installed on another drive and from what i've read on the webs you get to dualboot if you install ubuntu after vista. when i did install it (i installed on a blank hdd with no partitions, choosing the "erase entire disk" option since for some reason default option was attempting to eat a part of my windows 1 gb drive instead of using disk i specially made for it) and the grub 2 loaded for the first time, there was NO option to run vista. only 2 linux (normal and recovery) and 2 memtests. I've ran linux and went to google this. I found that i should add something to some config files in /etc/grub.d/From reading the readme file i understood i could add my own files that are named like NUMBER_SOMENAME and insert code into them. Because it said:Quote: For example, you can add an entry to boot another OS as01_otheros, 11_otheros, etc, depending on the position you want it to occupy inthe menu; and then adjust the default setting via /etc/default/grub. But then i found a file 40_custom that said:

Code:
#!/bin/sh
exec tail -n +3 $0

[code]....

View 9 Replies View Related

Ubuntu :: Changed Default Mp3 Player But Default Still Starting

Aug 21, 2010

I changed the default player for mp3 to audacious, which works fine, just that every time I doubleclick a mp3 file, a second application button appears in my taskbar saying "opening [file]" which looks like the default player. this program will eventually time out and go away, but it's still annoying - any idea on how I would go about fixing this?

View 2 Replies View Related

Ubuntu :: Changing Default Studio Appearance To Default?

Sep 28, 2010

I was using ubuntu 10.04 till yesterday.. and due to hdd crash i have changed my hdd.

while looking for my installation disc, my wall-mate gives me this Ubuntu Studio dvd and instead of downloading a new one, i have installed the studio. at the first sight ... i am being a fond of studio version .. its really cool.

now, i am quite habituated with default appearance of ubuntu, i found studio appearance is quite unusual (for me, menu layouts, panel everything).

I would like to know how do i change this default appearance like ubuntu default 10.04 appearance. I am attaching a screen-shoot of my friends desktop, he upgraded his ubuntu thru apptitude update.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved