spec .defs files need to handle arch-specific attributes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Medium
|
Bug Description
We have a particular case (described in bug 3849) where a structure
takes a "packed" attribute, but does so only for some architectures.
This does not emit into the .defs files used for the specification. When
the attribute is generic, it does emit.
These are the two examples:
INSERT INTO `Type` VALUES
(27726,
INSERT INTO `ArchType` VALUES (1,27726,
INSERT INTO `Type` VALUES
(32378,
INSERT INTO `ArchType` VALUES (1,32378,
INSERT INTO `ArchType` VALUES (11,32378,
INSERT INTO `ArchType` VALUES (2,32378,
INSERT INTO `ArchType` VALUES (3,32378,
INSERT INTO `ArchType` VALUES (6,32378,
INSERT INTO `ArchType` VALUES (9,32378,
INSERT INTO `ArchType` VALUES (10,32378,
INSERT INTO `ArchType` VALUES (12,32378,
For the former we get:
typedef struct snd_seq_ev_ext {
unsigned int len;
void *ptr;
} __attribute__ ((packed)) snd_seq_ev_ext_t;
For the latter, in generic:
struct epoll_event {
uint32_t events;
epoll_data_t data;
};
And in x86_64, which should have the packed:
/*
* This header is architecture neutral
* Please refer to the generic specification for details
*/
This matters since LSB is a binary specification, and the size of a
structure is part of the ABI, so we should list if there's a reason
a struct is not going to compile to the size you would expect.
Although a "spec bug" this is actually about the generator used
in build_env/headers.
Changed in mandriva: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
tags: | added: spec |