--with-sysroot用来指定系统的root。该选项主要用于新系统(比如LFS)构建或交叉编译。比如你的LFS的root在/mnt/lfs,那么configure时指定--with-sysroot=/mnt/lfs,编译器就会使用/mnt/lfs上的header和lib,而不是host上的。交叉编译器也会设定sysroot,避免搜索默认的header和lib路径。可以写个最小程序然后gcc -v main.c,如果编译器的sysroot非默认,就会打印出sysroot路径。

prefix用来指定make install的安装目录。比如你不想把软件安装在/(/bin和/lib)或/usr(/usr/bin和/usr/lib),而是想安装到/usr/local(/usr/local/bin和/usr/local/lib),就可以指定--prefix=/usr/local。

sysroot和prefix组合使用,其对路径的效果将叠加。

sysroot和prefix的更多相关文章

  1. 最简单的基于FFmpeg的移动端样例:IOS HelloWorld

    ===================================================== 最简单的基于FFmpeg的移动端样例系列文章列表: 最简单的基于FFmpeg的移动端样例:A ...

  2. 交叉编译中的 --sysroot 等等在编译时的作用

    --sysroot=dir 的作用 如果在编译时指定了-sysroot=dir 就是为编译时指定了逻辑目录.编译过程中需要引用的库,头文件,如果要到/usr/include目录下去找的情况下,则会在前 ...

  3. Spring配置文件标签报错:The prefix "XXX" for element "XXX:XXX" is not bound. .

    例如:The prefix "context" for element "context:annotation-config" is not bound. 这种 ...

  4. [LeetCode] Implement Trie (Prefix Tree) 实现字典树(前缀树)

    Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs ar ...

  5. [LeetCode] Longest Common Prefix 最长共同前缀

    Write a function to find the longest common prefix string amongst an array of strings. 这道题让我们求一系列字符串 ...

  6. 1014: [JSOI2008]火星人prefix

    1014: [JSOI2008]火星人prefix Time Limit: 10 Sec Memory Limit: 162 MB Description 火星人最近研究了一种操作:求一个字串两个后缀 ...

  7. [BZOJ1014][JSOI2008]火星人prefix

    [BZOJ1014][JSOI2008]火星人prefix 试题描述 火星人最近研究了一种操作:求一个字串两个后缀的公共前缀.比方说,有这样一个字符串:madamimadam,我们将这个字符串的各个字 ...

  8. No plugin found for prefix 'mybatis-generator' in the current project

    http://blog.csdn.net/you23hai45/article/details/50792430 1.错误描述 F:\workspaces\Mybatis>mvn mybatis ...

  9. 【leetcode】Longest Common Prefix

    题目简述: Write a function to find the longest common prefix string amongst an array of strings. 解题思路: c ...

随机推荐

  1. paddle——docker实践

    Docker image阅读:https://github.com/PaddlePaddle/book/blob/develop/README.cn.md docker run -d -p 8888: ...

  2. lecture4特征提取-七月在线-cv

    霍夫变换 http://blog.csdn.net/sudohello/article/details/51335237 http://blog.csdn.net/glouds/article/det ...

  3. 第三次随笔--安装虚拟机及学习linux系统初体验

    第三次随笔--安装虚拟机及学习linux系统初体验 ·学习基于VirtualBox虚拟机安装Ubuntu图文教程在自己笔记本上安装Linux操作系统 首先按照老师的提示步骤进行VirtualBox虚拟 ...

  4. (23)ajax实现上传文件的功能

    form表单上传文件 urls.py from django.conf.urls import urlfrom django.contrib import adminfrom app01 import ...

  5. Comet OJ - Contest #2 简要题解

    Comet OJ - Contest #2 简要题解 cometoj A 模拟,复杂度是对数级的. code B 易知\(p\in[l,r]\),且最终的利润关于\(p\)的表达式为\(\frac{( ...

  6. LeetCode - Top K Frequent Words

    Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted b ...

  7. LeetCode - Rectangle Overlap

    A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bot ...

  8. mysql优化查询

    使用索引查询 MariaDB [test]> explain select * from te where id=22; #在没有增加索引情况下,rows为7,即查询行数 +------+--- ...

  9. day1 python学习

    Python的分类 编译型:一次性,将全部程序编译成二进制文件,然后再运行. 有点:执行效率高 缺点:开发效率低,不能跨平台使用. 解释型:当你程序运行时,一行一行的解释,并运行 优点:开发效率高,可 ...

  10. python基础教程_学习笔记9:抽象

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/signjing/article/details/30745465 抽象 懒惰即美德. 抽象和结构 抽 ...