| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.152 2011/07/12 04:08:52 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.153 2011/08/17 17:54:48 vapier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: flag-o-matic.eclass |
5 | # @ECLASS: flag-o-matic.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # toolchain@gentoo.org |
7 | # toolchain@gentoo.org |
| 8 | # @BLURB: common functions to manipulate and query toolchain flags |
8 | # @BLURB: common functions to manipulate and query toolchain flags |
| … | |
… | |
| 129 | # @FUNCTION: filter-lfs-flags |
129 | # @FUNCTION: filter-lfs-flags |
| 130 | # @DESCRIPTION: |
130 | # @DESCRIPTION: |
| 131 | # Remove flags that enable Large File Support. |
131 | # Remove flags that enable Large File Support. |
| 132 | filter-lfs-flags() { |
132 | filter-lfs-flags() { |
| 133 | [[ -n $@ ]] && die "filter-lfs-flags takes no arguments" |
133 | [[ -n $@ ]] && die "filter-lfs-flags takes no arguments" |
|
|
134 | # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html |
|
|
135 | # _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...) |
|
|
136 | # _LARGEFILE64_SOURCE: enable support for 64bit variants (off64_t/fseeko64/etc...) |
|
|
137 | # _FILE_OFFSET_BITS: default to 64bit variants (off_t is defined as off64_t) |
| 134 | filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE |
138 | filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE |
| 135 | } |
139 | } |
| 136 | |
140 | |
| 137 | # @FUNCTION: append-cppflags |
141 | # @FUNCTION: append-cppflags |
| 138 | # @USAGE: <flags> |
142 | # @USAGE: <flags> |