如何强制的/ usr / bin中/ GCC - >在/ usr /斌/ gcc的-m32? [英] How to force /usr/bin/gcc -> /usr/bin/gcc -m32?

查看:134
本文介绍了如何强制的/ usr / bin中/ GCC - >在/ usr /斌/ gcc的-m32?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大的捆绑软件分发的不良生成文件(S)。在某些时候编译器总是忘记我要在32位程序进行编译。这将导致该计划的一部分,有64位库等都有32位的库。

I have bad Makefile(s) of a large bundled software distribution. In some point compiler always "forgets" that I want to compile in 32 bit program. This causes that part of the programs have 64 bit libraries and others have 32 bit libraries.

我怎么能强迫-m32选项每次我运行gcc的时候?

How can I force -m32 option every time that I run gcc?

BR,
尤哈

br,
Juha

P.S。我的环境是混合32/64位(macbook5.1,雪豹)。或者:我怎样才能让我的系统纯粹是32位还是64位

P.S. My environment is mixed 32/64 bit (macbook5.1, snow leopard). Alternatively: How can I make my system purely 32 or 64 bits?

编辑:坏的Makefile强调是覆盖全局变量。这就是为什么我chosed,工程破解。

edit: Emphasis on the bad Makefiles that override the global variables. Thats why I chosed the hack that works.

推荐答案

如果你想有一个糟糕的黑客,你可以替换了/ usr / bin中/ gcc的这个shell脚本:

If you want a crappy hack, you could replace /usr/bin/gcc with this shell script:

#!/bin/bash
/usr/bin/gcc-4.whatever -m32 "$@"

这篇关于如何强制的/ usr / bin中/ GCC - >在/ usr /斌/ gcc的-m32?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆