gnu

Why does my Mac (OS X 10.7.3) have an old version (2.3) of Gnu Bison?

邮差的信 提交于 2019-12-06 01:57:43
问题 The version of GNU Bison on my mac is 2.3 but I know that Bison 2.5 was released long ago. The book Flex & Bison uses version 2.5. Should I upgrade to 2.5 myself? Is it necessary? What's the difference between 2.3 and 2.5? 回答1: If you use Brew: brew tap homebrew/dupes && brew install bison If you use MacPorts: sudo port install bison If you use Fink, they're still on 2.3, just like Apple, so you'll have to edit the package yourself. If you know how to install Unix software, download it, untar

Put gcc libs .data in specific section?

只谈情不闲聊 提交于 2019-12-06 01:47:39
I'm trying to switch to the GNU GCC compiler for our embedded system, but I'm having trouble linking the project as the memory layout of our chip is split: RAM section 1: 0x10000-0x12FFF RAM section 2: 0x18000-0x1BFFF The data from our project can fit in section 1, but the data linked from the gcc libs doesn't. Map file extract: .data 0x00012974 0x3c4 c:/tools/gnucr16_v1.1.3-elf/cr16-elf/bin/../lib/gcc/cr16-elf/4.5.1-GNUCR16_v1.1.3/../../../../cr16-elf/lib\libc.a(lib_a-impure.o) 0x00012974 _impure_ptr .data 0x00012d7c 0x410 c:/tools/gnucr16_v1.1.3-elf/cr16-elf/bin/../lib/gcc/cr16-elf/4.5.1

How to make configure script check the dependencies

依然范特西╮ 提交于 2019-12-06 01:20:10
I generated a configure script with autoconf to build my project. It works fine unless I don't have some needed library installed. Make returns error when lacking some files, but it should be actually checked by the configure script i think? So my question is: How to modify an autoconf generated script to seek for dependencies and tell the user which libraries it lacks? Depends on the dependency, there is no generic solution. There are AC_CHECK_LIB and AC_SEARCH_LIBS macros that may work for you if the libraries and headers are installed in standard locations. Many packages nowadays support

building a Cygwin version of GNU make

喜夏-厌秋 提交于 2019-12-06 00:02:56
I want to add a couple of logging options to GNU make so I can see what is happening when building FireFox and friends. I have the make-3.80 sources and a complete working Cygwin build environment. Starting with ./configure and the Make I get a working executable as expected. Question: What configuration is required so the executable in an identical manner to the make.exe bundled in Moztools? Background: If HAVE_CYGWIN_SHELL is not defined then with #define HAVE_CYGWIN_SHELL 1 Make barfs as soon as it hits this section of the Mozilla configure script CWD := $(shell pwd) ifneq (1,$(words $(CWD)

How to add colors to every point in gnuplot from inside the point file

馋奶兔 提交于 2019-12-05 21:33:23
Reading this and this answer I understood that changing the colours of every point is possible, but: it has to be defined using set palette model RGB defined () , hence if I want 100 different colours I will have to define all of them the colour of the point is specified just before it is drawn. My question is, is there a way to avoid all of the above, for example modify my data file as follows: x y z R G B 1 2 3 0 255 255 5 6 2 255 0 0 And have the according point drawn with the specified colour? Try the following on gnuplot 4.6+: rgb(r,g,b) = 65536 * int(r) + 256 * int(g) + int(b) plot "data

GNU链接脚本使用

随声附和 提交于 2019-12-05 20:02:45
GNU链接脚本使用 链接脚本主要作用是描述输入文件的section是如何映射到输出文件的内存布局中。通俗的讲法就是编译完成后的各个obj文件,按照哪种顺序放与bin的哪个地址中;同时将运行时变量符号与VMA关联。 主要参考了下边几个博客: 1. 链接脚本的 __attribute__ 属性 2. GNU-ld链接脚本浅析 使用案例 1. 将变量或函数存放在用户定义的区域 主要目的是可以将变量或函数,运行时链接到用户定义的区域中,比如SRAM,某些CPU比直接放在FLASH中运行快(不一定,比如STM32,片内FLASH在ICODE总线上,指令预取功能使能将实现类似多级流水线的操作,SRAM则不再ICODE上,需要 "取指->译码->执行"无法加速。 主要使用链接脚本语法有: MEMORY命令定义存储区域,通过输出section描述的 >REGION 显式的将该段限定到具体的存储区域。 如下:最后的区域为stm32f746ng最后64k,用来存放测试的变量。 MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 960K USER_AREA(rx) : ORIGIN = 0x80F0000, LENGTH = 64K }

Linux的各个发行版本(一)

吃可爱长大的小学妹 提交于 2019-12-05 19:02:32
三大流派 1、SUSE SUSE Linux Enterprise Server (SLES) OpenSuse桌面 2、debian 迄今为止最遵循GNU规范的Linux系统 Ubuntu 基于Debian的unstable版本加强而来 deepin mint 3、redhat RHEL:RedHat Enterprise Linux,每18个月发行一个系版本 CentOS: 兼容RHEL的格式 Oracle 中标麒麟:中标软件 Fedora:每6个月发行一个新版本(测试版本) 4、ArchLinux:轻量简洁 5、Gentoo:极致性能,不提供传统安装程序,需要使用源代码进行编译安装 6、LFS:Linux From scratch 自制系统(说明书、文档) 7、Android:kernel+busybox(工具集)+ java虚拟机 三者之间的关系 Linux实际只是一个操作系统的内核,不是一个完整的系统,并且是开源的,都是基于GPL协议发布对的,只要遵循此协议任何人都可以在原有的软件构成的基础上再开发和发布,因此Centos诞生 既Linux内核+GNU工具包=新的发型版本 来源: https://www.cnblogs.com/stationing/p/11939782.html

Octave GNU: Undefined variable 'x' , even though it's defined as function input

可紊 提交于 2019-12-05 16:49:49
just trying to write a simple program to find the gcd of n numbers. I have no clue how to fix this error, i've read all of octaves function documentation and tried to find questions like this ... Just started programming in Octave btw. Here's the code: function divisor = gcd(x, y) q=0; r=0; l=0; h=0; if(x>y) h=x; l=y; elseif(x<y) h=y; l=x; else h=y; l=x; endif while(r != 0) q=floor(h/l); r = h-l*q; q=h; r=l; endwhile divisor = q; printf("%d", q); return; endfunction The Error: error: 'x' undefined near line 6 column 6 error: called from gcd at line 6 column 3 Thank you :) Your code is a

Relocation value does not fit in 24 bits

末鹿安然 提交于 2019-12-05 16:13:28
I tried to load a code file to memory using the vxWorks function loadModule and it gave me the error: Relocation value does not fit in 24 bits I tried to add the -mlongcall flag in my compiler but it doesn't work. I have seen this error before working in a PowerPC architecture. Assuming that you are working in a similar environment, the issue has to do specifically with the amount of memory in the system and the range of the relative branch instruction. The Argonne National Labs has a webpage detailing their experiences with the same issue . The following excerpt explains the issue with the

GNU make kind-of-double colon

夙愿已清 提交于 2019-12-05 15:43:48
I've got a little problem understanding following gmake syntax: OBJ = foo.o bar.o $(OBJ): %.o: %.cpp $(CC) -c -MMD -MP $(INCLUDES) $(CFLAGS) $< -o $@ @sed (...create empty targets in file...) I'm not sure what $(...): %.o: %.cpp does!? I think it might translate the "%.o: %.cpp" in correct %.cpp dependencies - does it? Google is not much of a help here - it finds just the usual double colon (target::) which is something different! Any advice? Thanks! This is a static pattern rule . $(OBJ) is a list of targets. The %.o : %.cpp means "for each target in the list that matches %.o , it is